summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pvrusb2
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2007-09-09 03:10:11 +0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-10-10 03:14:30 +0200
commit747f07961e9450058522840129cd7bb994f05fb9 (patch)
tree6ffdf8e2057b1cbc64f747e3a05464036f7bd3c6 /drivers/media/video/pvrusb2
parentV4L/DVB (6203): Fix SVideo input on KWorld DVB-T 220 boards (diff)
downloadlinux-747f07961e9450058522840129cd7bb994f05fb9.tar.xz
linux-747f07961e9450058522840129cd7bb994f05fb9.zip
V4L/DVB (6205): pvrusb2: Fix oops in error leg cleanup
Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/pvrusb2')
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-context.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-context.c b/drivers/media/video/pvrusb2/pvrusb2-context.c
index 6bbed88d7867..22719ba861ac 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-context.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-context.c
@@ -33,8 +33,10 @@ static void pvr2_context_destroy(struct pvr2_context *mp)
{
if (mp->hdw) pvr2_hdw_destroy(mp->hdw);
pvr2_trace(PVR2_TRACE_STRUCT,"Destroying pvr_main id=%p",mp);
- flush_workqueue(mp->workqueue);
- destroy_workqueue(mp->workqueue);
+ if (mp->workqueue) {
+ flush_workqueue(mp->workqueue);
+ destroy_workqueue(mp->workqueue);
+ }
kfree(mp);
}