From: Julia Lawall Date: Fri, 12 Aug 2011 11:40:08 +0000 (-0300) Subject: [media] drivers/media/video/zr364xx.c: add missing cleanup code X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0163b924c5c54f9737357f622fd923a9d80556bd;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git [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 Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/zr364xx.c b/drivers/media/video/zr364xx.c index c492846c1c5a..e78cf94f491e 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, if (!cam->read_endpoint) { dev_err(&intf->dev, "Could not find bulk-in endpoint\n"); + video_device_release(cam->vdev); + kfree(cam); + cam = NULL; return -ENOMEM; }