2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-18 10:13:57 +08:00

V4L/DVB: hdpvr: Fixes probing function

In the hdpvr_probe () function, when an error occurs while probing the device,
the workqueue created by the create_single_thread () call is not properly
destroyed.

Signed-off-by: Perceval Anichini <perceval@trilogic.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Perceval Anichini 2010-07-05 15:11:51 -03:00 committed by Mauro Carvalho Chehab
parent fe85ce90ab
commit 07204aea14

View File

@ -286,6 +286,8 @@ static int hdpvr_probe(struct usb_interface *interface,
goto error;
}
dev->workqueue = 0;
/* register v4l2_device early so it can be used for printks */
if (v4l2_device_register(&interface->dev, &dev->v4l2_dev)) {
err("v4l2_device_register failed");
@ -380,6 +382,9 @@ static int hdpvr_probe(struct usb_interface *interface,
error:
if (dev) {
/* Destroy single thread */
if (dev->workqueue)
destroy_workqueue(dev->workqueue);
/* this frees allocated memory */
hdpvr_delete(dev);
}