diff options
author | Ilia Mirkin <imirkin@alum.mit.edu> | 2011-03-13 05:29:16 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-03-14 18:57:38 (GMT) |
commit | 4d527a7adbc47bdc357ddab513861e6a7636755e (patch) | |
tree | 0d87536398e7cf4ee9112cd0886c2b4c55e30bb8 /drivers/staging | |
parent | 1d5c536efeb9c109e330209867ae1242d42cdb7b (diff) | |
download | linux-fsl-qoriq-4d527a7adbc47bdc357ddab513861e6a7636755e.tar.xz |
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>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/winbond/wb35reg.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/winbond/wb35reg.c b/drivers/staging/winbond/wb35reg.c index 42ae6101..da595f1 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; |