summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2011-03-13 00:29:16 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-03-14 11:57:38 -0700
commit4d527a7adbc47bdc357ddab513861e6a7636755e (patch)
tree0d87536398e7cf4ee9112cd0886c2b4c55e30bb8
parent1d5c536efeb9c109e330209867ae1242d42cdb7b (diff)
staging: winbond: 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>
-rw-r--r--drivers/staging/winbond/wb35reg.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/winbond/wb35reg.c b/drivers/staging/winbond/wb35reg.c
index 42ae6101452..da595f16f63 100644
--- a/drivers/staging/winbond/wb35reg.c
+++ b/drivers/staging/winbond/wb35reg.c
@@ -66,8 +66,7 @@ unsigned char Wb35Reg_BurstWrite(struct hw_data *pHwData, u16 RegisterNo, u32 *p
} else {
if (urb)
usb_free_urb(urb);
- if (reg_queue)
- kfree(reg_queue);
+ kfree(reg_queue);
return false;
}
return false;