[PATCH 2/3] acpica: fwts_acpica: no need to check for null ptr on fwts_low_free

Colin King colin.king at canonical.com
Fri Jun 7 08:41:38 UTC 2013


From: Colin Ian King <colin.king at canonical.com>

fwts_low_free already does a NULL pointer check (like most free's)
so no need to check it is NULL before free'ing.

Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
 src/acpica/fwts_acpica.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/acpica/fwts_acpica.c b/src/acpica/fwts_acpica.c
index 835685b..42b68f1 100644
--- a/src/acpica/fwts_acpica.c
+++ b/src/acpica/fwts_acpica.c
@@ -1062,10 +1062,7 @@ int fwts_acpica_init(fwts_framework *fw)
 }
 
 #define FWTS_ACPICA_FREE(x)	\
-	if (x) {		\
-		fwts_low_free(x);	\
-		x = NULL;	\
-	}			\
+	{ fwts_low_free(x); x = NULL; }
 
 /*
  *  fwts_acpica_deinit()
-- 
1.8.3




More information about the fwts-devel mailing list