summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/pvrusb2/pvrusb2-main.c
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2007-11-02 22:06:42 -0500
committerMike Isely <isely@pobox.com>2007-11-02 22:06:42 -0500
commit0d047cc5c24e86c3087e7c2300d048f48a11988a (patch)
tree4ac5d6b8a55a61e91874b41104c2032467378716 /linux/drivers/media/video/pvrusb2/pvrusb2-main.c
parenta10e3e59904fd6ce093ec74c0ad541afbbebc3e2 (diff)
downloadmediapointer-dvb-s2-0d047cc5c24e86c3087e7c2300d048f48a11988a.tar.gz
mediapointer-dvb-s2-0d047cc5c24e86c3087e7c2300d048f48a11988a.tar.bz2
pvrusb2: Fix oops on module removal
From: Mike Isely <isely@pobox.com> 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>
Diffstat (limited to 'linux/drivers/media/video/pvrusb2/pvrusb2-main.c')
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-main.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-main.c b/linux/drivers/media/video/pvrusb2/pvrusb2-main.c
index 73be66dd3..687096d1f 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-main.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-main.c
@@ -140,14 +140,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);