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>
This commit is contained in:
Mike Isely 2007-09-08 22:10:11 -03:00 committed by Mauro Carvalho Chehab
parent 289ea1f033
commit 747f07961e
1 changed files with 4 additions and 2 deletions

View File

@ -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);
}