Skip to content

Commit

Permalink
[media] drivers/media/video/zr364xx.c: add missing cleanup code
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Julia Lawall authored and Mauro Carvalho Chehab committed Sep 3, 2011
1 parent e6a476f commit 0163b92
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/media/video/zr364xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 0163b92

Please sign in to comment.