aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2011-08-12 07:40:08 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-09-03 17:43:58 -0400
commit0163b924c5c54f9737357f622fd923a9d80556bd (patch)
tree4a48704d19262a062671c2dec211835d9f71ed5d /drivers/media
parente6a476fd5f6593e023250b0ab00b0b68117a5da2 (diff)
[media] drivers/media/video/zr364xx.c: add missing cleanup code
It seems just as necessary to free cam->vdev and cam in this error case as in the next one. Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/zr364xx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/video/zr364xx.c b/drivers/media/video/zr364xx.c
index c492846c1c5..e78cf94f491 100644
--- a/drivers/media/video/zr364xx.c
+++ b/drivers/media/video/zr364xx.c
@@ -1638,6 +1638,9 @@ static int zr364xx_probe(struct usb_interface *intf,
1638 1638
1639 if (!cam->read_endpoint) { 1639 if (!cam->read_endpoint) {
1640 dev_err(&intf->dev, "Could not find bulk-in endpoint\n"); 1640 dev_err(&intf->dev, "Could not find bulk-in endpoint\n");
1641 video_device_release(cam->vdev);
1642 kfree(cam);
1643 cam = NULL;
1641 return -ENOMEM; 1644 return -ENOMEM;
1642 } 1645 }
1643 1646