[PATCH 06/24] staging: go7007: Remove NULL check before kfree

From: Ilia Mirkin
Date: Sun Mar 13 2011 - 00:30:03 EST


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@xxxxxxxxxxxx>
---
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);
}
}
--
1.7.3.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/