diff options
author | Ilia Mirkin <imirkin@alum.mit.edu> | 2011-03-13 00:28:59 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-03-14 11:57:32 -0700 |
commit | 56d17639703b4683e3e9be36dff7c6d811f4cbf5 (patch) | |
tree | 9544152c62170d1ece0ee08f2ccc843950be430d /drivers | |
parent | b00917802bda6eba09125e8b4d273339188f9bad (diff) | |
download | op-kernel-dev-56d17639703b4683e3e9be36dff7c6d811f4cbf5.zip op-kernel-dev-56d17639703b4683e3e9be36dff7c6d811f4cbf5.tar.gz |
staging: go7007: 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')
-rw-r--r-- | drivers/staging/go7007/go7007-usb.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/go7007/go7007-usb.c b/drivers/staging/go7007/go7007-usb.c index bea9f4d..3db3b0a 100644 --- a/drivers/staging/go7007/go7007-usb.c +++ b/drivers/staging/go7007/go7007-usb.c @@ -1247,15 +1247,13 @@ static void go7007_usb_disconnect(struct usb_interface *intf) vurb = usb->video_urbs[i]; if (vurb) { usb_kill_urb(vurb); - if (vurb->transfer_buffer) - kfree(vurb->transfer_buffer); + kfree(vurb->transfer_buffer); usb_free_urb(vurb); } aurb = usb->audio_urbs[i]; if (aurb) { usb_kill_urb(aurb); - if (aurb->transfer_buffer) - kfree(aurb->transfer_buffer); + kfree(aurb->transfer_buffer); usb_free_urb(aurb); } } |