diff options
Diffstat (limited to 'drivers/usb/media/ov511.c')
-rw-r--r-- | drivers/usb/media/ov511.c | 12 |
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 | ||
5962 | error_out: | 5958 | error_out: |
5963 | err("Camera initialization failed"); | 5959 | err("Camera initialization failed"); |