Skip to content

Commit

Permalink
staging: winbond: Remove NULL check before kfree
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ilia Mirkin authored and Greg Kroah-Hartman committed Mar 14, 2011
1 parent 1d5c536 commit 4d527a7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/staging/winbond/wb35reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4d527a7

Please sign in to comment.