diff options
author | Mike Isely <isely@pobox.com> | 2007-09-08 20:10:11 -0500 |
---|---|---|
committer | Mike Isely <isely@pobox.com> | 2007-09-08 20:10:11 -0500 |
commit | 9333df4e35f2d7bddb733c3c7b46883394e5ea0e (patch) | |
tree | 036a4d294a4ef03b7d4de245a35dd195ab119b77 /linux/drivers/media/video/pvrusb2 | |
parent | 8fc1625961d30be9a8665f97c7eb889e078c9e76 (diff) | |
download | mediapointer-dvb-s2-9333df4e35f2d7bddb733c3c7b46883394e5ea0e.tar.gz mediapointer-dvb-s2-9333df4e35f2d7bddb733c3c7b46883394e5ea0e.tar.bz2 |
pvrusb2: Fix oops in error leg cleanup
From: Mike Isely <isely@pobox.com>
Signed-off-by: Mike Isely <isely@pobox.com>
Diffstat (limited to 'linux/drivers/media/video/pvrusb2')
-rw-r--r-- | linux/drivers/media/video/pvrusb2/pvrusb2-context.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-context.c b/linux/drivers/media/video/pvrusb2/pvrusb2-context.c index a7684d9d3..80e2e5ea1 100644 --- a/linux/drivers/media/video/pvrusb2/pvrusb2-context.c +++ b/linux/drivers/media/video/pvrusb2/pvrusb2-context.c @@ -34,8 +34,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); } |