diff options
author | Mike Isely <isely@pobox.com> | 2007-11-03 00:06:42 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-11-04 21:41:30 -0200 |
commit | 4f663bdc65307e38401aa3b787a7a7569f28b920 (patch) | |
tree | aea1066d6df027b5a194d5367fab0bd3b7841c80 /drivers/media | |
parent | ac72fed79fbbdb35882b393401584435c9fc37ac (diff) | |
download | op-kernel-dev-4f663bdc65307e38401aa3b787a7a7569f28b920.zip op-kernel-dev-4f663bdc65307e38401aa3b787a7a7569f28b920.tar.gz |
V4L/DVB (6548): pvrusb2: Fix oops on module removal
The pvrusb2 driver is tearing down its sysfs related pieces in the
incorrect order. This leaves dangling pointers which causes the
kernel device core to oops. The problem has been present virtually
forever but became malignant with the changeover to the way of
handling /sys/class. Fix is just to make sure we don't tear down the
class structure until AFTER the driver instances are deregistered.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-main.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-main.c b/drivers/media/video/pvrusb2/pvrusb2-main.c index ca9e278..11b3b2e 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-main.c +++ b/drivers/media/video/pvrusb2/pvrusb2-main.c @@ -136,14 +136,13 @@ static int __init pvr_init(void) static void __exit pvr_exit(void) { - pvr2_trace(PVR2_TRACE_INIT,"pvr_exit"); + usb_deregister(&pvr_driver); + #ifdef CONFIG_VIDEO_PVRUSB2_SYSFS pvr2_sysfs_class_destroy(class_ptr); #endif /* CONFIG_VIDEO_PVRUSB2_SYSFS */ - - usb_deregister(&pvr_driver); } module_init(pvr_init); |