]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
Staging: wilc1000: Remove null check before kfree
authorShraddha Barke <shraddha.6596@gmail.com>
Wed, 14 Oct 2015 01:59:19 +0000 (07:29 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Oct 2015 04:31:25 +0000 (21:31 -0700)
commit95f840fb5355eda0bf797a2d7b6e684127128cac
tree6c3f2483b15f44931828a986a2ef87a250dc634c
parent784c7d2f0e390bcda734ee4ea8c7289777abf1c6
Staging: wilc1000: Remove null check before kfree

kfree on NULL pointer is a no-op.
The semantic patch used to find such an instance where NULL check is
present before kfree-

// <smpl>
@@ expression E; @@
- if (E != NULL) { kfree(E); }
+ kfree(E);
@@ expression E; @@
- if (E != NULL) { kfree(E); E = NULL; }
+ kfree(E);
+ E = NULL;
// </smpl>smpl>

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/host_interface.c