提交 0163b924 编写于 作者: J Julia Lawall 提交者: Mauro Carvalho Chehab

[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: NJulia Lawall <julia@diku.dk>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 e6a476fd
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册