Staging: lustre: osc: Remove null check before kfree
authorShraddha Barke <shraddha.6596@gmail.com>
Mon, 12 Oct 2015 15:19:18 +0000 (20:49 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Oct 2015 23:45:21 +0000 (16:45 -0700)
commitf999d0987ec1e88c455fb95e48a12a98a9fbd9a6
tree71109e16c1e91b6fafa1191021a553a4319d6c19
parent03a7fc24e82985e0f1b4c543d310acde9ec84a42
Staging: lustre: osc: 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>
Reviewed-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/osc/osc_request.c