aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/media/ov511.c
diff options
context:
space:
mode:
authorJesper Juhl <[email protected]>2005-04-19 00:39:34 +0000
committerGreg K-H <[email protected]>2005-04-19 00:39:34 +0000
commit1bc3c9e1e44c2059fe2ffa6ff70ad0a925d7b05f (patch)
tree0bc14ec53acf3b4c08a9995c7ea335e236435558 /drivers/usb/media/ov511.c
parent[PATCH] usb: kfree() cleanups in drivers/usb/core/devio.c (diff)
downloadkernel-1bc3c9e1e44c2059fe2ffa6ff70ad0a925d7b05f.tar.gz
kernel-1bc3c9e1e44c2059fe2ffa6ff70ad0a925d7b05f.zip
[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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> 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)
ov->tempfbuf = NULL;
for (i = 0; i < OV511_NUMSBUF; i++) {
- if (ov->sbuf[i].data) {
- kfree(ov->sbuf[i].data);
- ov->sbuf[i].data = NULL;
- }
+ kfree(ov->sbuf[i].data);
+ ov->sbuf[i].data = NULL;
}
for (i = 0; i < OV511_NUMFRAMES; i++) {
@@ -5954,10 +5952,8 @@ error:
up(&ov->cbuf_lock);
}
- if (ov) {
- kfree(ov);
- ov = NULL;
- }
+ kfree(ov);
+ ov = NULL;
error_out:
err("Camera initialization failed");