aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/media/ov511.c
diff options
context:
space:
mode:
authorJesper Juhl <juhl-lkml@dif.dk>2005-04-18 20:39:34 -0400
committerGreg K-H <gregkh@suse.de>2005-04-18 20:39:34 -0400
commit1bc3c9e1e44c2059fe2ffa6ff70ad0a925d7b05f (patch)
tree0bc14ec53acf3b4c08a9995c7ea335e236435558 /drivers/usb/media/ov511.c
parent6fd19f4b55f7fd1c9d8650bd7f8df2c81b69c5ca (diff)
[PATCH] USB: kfree cleanup for drivers/usb/* - no need to check for NULL
Get rid of a bunch of redundant NULL pointer checks in drivers/usb/*, there's no need to check a pointer for NULL before calling kfree() on it. Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Index: gregkh-2.6/drivers/usb/class/audio.c ===================================================================
Diffstat (limited to 'drivers/usb/media/ov511.c')
-rw-r--r--drivers/usb/media/ov511.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/usb/media/ov511.c b/drivers/usb/media/ov511.c
index 0fd7ffed3a98..d6051822416e 100644
--- a/drivers/usb/media/ov511.c
+++ b/drivers/usb/media/ov511.c
@@ -3915,10 +3915,8 @@ ov51x_do_dealloc(struct usb_ov511 *ov)
3915 ov->tempfbuf = NULL; 3915 ov->tempfbuf = NULL;
3916 3916
3917 for (i = 0; i < OV511_NUMSBUF; i++) { 3917 for (i = 0; i < OV511_NUMSBUF; i++) {
3918 if (ov->sbuf[i].data) { 3918 kfree(ov->sbuf[i].data);
3919 kfree(ov->sbuf[i].data); 3919 ov->sbuf[i].data = NULL;
3920 ov->sbuf[i].data = NULL;
3921 }
3922 } 3920 }
3923 3921
3924 for (i = 0; i < OV511_NUMFRAMES; i++) { 3922 for (i = 0; i < OV511_NUMFRAMES; i++) {
@@ -5954,10 +5952,8 @@ error:
5954 up(&ov->cbuf_lock); 5952 up(&ov->cbuf_lock);
5955 } 5953 }
5956 5954
5957 if (ov) { 5955 kfree(ov);
5958 kfree(ov); 5956 ov = NULL;
5959 ov = NULL;
5960 }
5961 5957
5962error_out: 5958error_out:
5963 err("Camera initialization failed"); 5959 err("Camera initialization failed");