aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorPerceval Anichini <perceval@trilogic.fr>2010-07-05 14:11:51 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-08-02 14:28:34 -0400
commit07204aea1454db404141e95fc124536a6e0f6aa0 (patch)
tree09577bf07b4c44b05b68b04abcf1d9dabff036ff /drivers
parentfe85ce90abae7f7876a9ae8f76649586fe73d5a2 (diff)
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/hdpvr/hdpvr-core.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/media/video/hdpvr/hdpvr-core.c b/drivers/media/video/hdpvr/hdpvr-core.c
index 830d47b05e1d..0cae5b82e1a2 100644
--- a/drivers/media/video/hdpvr/hdpvr-core.c
+++ b/drivers/media/video/hdpvr/hdpvr-core.c
@@ -286,6 +286,8 @@ static int hdpvr_probe(struct usb_interface *interface,
286 goto error; 286 goto error;
287 } 287 }
288 288
289 dev->workqueue = 0;
290
289 /* register v4l2_device early so it can be used for printks */ 291 /* register v4l2_device early so it can be used for printks */
290 if (v4l2_device_register(&interface->dev, &dev->v4l2_dev)) { 292 if (v4l2_device_register(&interface->dev, &dev->v4l2_dev)) {
291 err("v4l2_device_register failed"); 293 err("v4l2_device_register failed");
@@ -380,6 +382,9 @@ static int hdpvr_probe(struct usb_interface *interface,
380 382
381error: 383error:
382 if (dev) { 384 if (dev) {
385 /* Destroy single thread */
386 if (dev->workqueue)
387 destroy_workqueue(dev->workqueue);
383 /* this frees allocated memory */ 388 /* this frees allocated memory */
384 hdpvr_delete(dev); 389 hdpvr_delete(dev);
385 } 390 }