From: Ilia Mirkin Date: Sun, 13 Mar 2011 05:29:14 +0000 (-0500) Subject: staging: vt6655: Remove NULL check before kfree X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6403bb7dc1f6d77a93850935d9277a0d74783cf0;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git staging: vt6655: Remove NULL check before kfree This patch was generated by the following semantic patch: // @@ expression E; @@ - if (E != NULL) { kfree(E); } + kfree(E); @@ expression E; @@ - if (E != NULL) { kfree(E); E = NULL; } + kfree(E); + E = NULL; // Signed-off-by: Ilia Mirkin Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index 638e3916774d..efaf19bc07b7 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -3064,8 +3064,7 @@ else { } error1: - if(buffer) - kfree(buffer); + kfree(buffer); if(filp_close(filp,NULL)) printk("Config_FileOperation:close file fail\n"); diff --git a/drivers/staging/vt6655/hostap.c b/drivers/staging/vt6655/hostap.c index 5b83f942cdab..773502702203 100644 --- a/drivers/staging/vt6655/hostap.c +++ b/drivers/staging/vt6655/hostap.c @@ -860,8 +860,7 @@ int vt6655_hostap_ioctl(PSDevice pDevice, struct iw_point *p) } out: - if (param != NULL) - kfree(param); + kfree(param); return ret; } diff --git a/drivers/staging/vt6655/wpactl.c b/drivers/staging/vt6655/wpactl.c index 4bdb8362de82..fbae16de27a7 100644 --- a/drivers/staging/vt6655/wpactl.c +++ b/drivers/staging/vt6655/wpactl.c @@ -987,8 +987,7 @@ int wpa_ioctl(PSDevice pDevice, struct iw_point *p) } out: - if (param != NULL) - kfree(param); + kfree(param); return ret; }