Staging: wilc1000: wilc_wfi_cfgoperations: Remove NULL check before kfree
authorShraddha Barke <shraddha.6596@gmail.com>
Mon, 12 Oct 2015 15:19:19 +0000 (20:49 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Oct 2015 04:02:25 +0000 (21:02 -0700)
commitcccfc39e5cf502334558ed511873195d5b8df03f
tree1f70e6c04cdf2b810383edd8d59597c8dd983d65
parentc22cbec069b532c4a9a33236305ee4d833ec67e6
Staging: wilc1000: wilc_wfi_cfgoperations: Remove NULL check before kfree

kfree on NULL pointer is a no-op.

The semantic patch used-

// <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/wilc_wfi_cfgoperations.c