mirror of
https://github.com/torvalds/linux.git
synced 2026-05-22 06:01:53 +02:00
staging: vt6655: Remove NULL check before kfree
This patch was generated by the following semantic patch:
// <smpl>
@@ expression E; @@
- if (E != NULL) { kfree(E); }
+ kfree(E);
@@ expression E; @@
- if (E != NULL) { kfree(E); E = NULL; }
+ kfree(E);
+ E = NULL;
// </smpl>
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
794a8946ba
commit
6403bb7dc1
|
|
@ -3064,8 +3064,7 @@ else {
|
|||
}
|
||||
|
||||
error1:
|
||||
if(buffer)
|
||||
kfree(buffer);
|
||||
kfree(buffer);
|
||||
|
||||
if(filp_close(filp,NULL))
|
||||
printk("Config_FileOperation:close file fail\n");
|
||||
|
|
|
|||
|
|
@ -860,8 +860,7 @@ int vt6655_hostap_ioctl(PSDevice pDevice, struct iw_point *p)
|
|||
}
|
||||
|
||||
out:
|
||||
if (param != NULL)
|
||||
kfree(param);
|
||||
kfree(param);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -987,8 +987,7 @@ int wpa_ioctl(PSDevice pDevice, struct iw_point *p)
|
|||
}
|
||||
|
||||
out:
|
||||
if (param != NULL)
|
||||
kfree(param);
|
||||
kfree(param);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user