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

Alex Hung alex.hung at canonical.com
Mon Jun 10 07:45:30 UTC 2013


On 06/07/2013 04:41 PM, Colin King wrote:
> 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()
>
Acked-by: <alex.hung at canonical.com>

-- 
Cheers,
Alex Hung



More information about the fwts-devel mailing list