diff options
author | Stefan Achatz <erazor_de@users.sourceforge.net> | 2011-01-30 07:38:27 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2011-02-03 10:37:28 -0500 |
commit | 74b643dac475e29f53f4132d2349ec1dba3c9e44 (patch) | |
tree | 7dc09d1d853a01fcade0255dd56c9e07b40c92c1 /drivers/hid/hid-roccat-kovaplus.c | |
parent | 8211e46004518c977f70f2661da961d5ba617399 (diff) |
HID: roccat: Fix NULL pointer dereference when unloading module
Class was destroyed before starting the unregistering driver chain.
Disconnecting a device from roccat chardev in this process then
raised a NULL pointer dereference.
Fixed this by destroying class after unregistering driver.
Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-roccat-kovaplus.c')
-rw-r--r-- | drivers/hid/hid-roccat-kovaplus.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/hid-roccat-kovaplus.c b/drivers/hid/hid-roccat-kovaplus.c index 7664e2ce2886..4eeb62fb4e75 100644 --- a/drivers/hid/hid-roccat-kovaplus.c +++ b/drivers/hid/hid-roccat-kovaplus.c | |||
@@ -703,8 +703,8 @@ static int __init kovaplus_init(void) | |||
703 | 703 | ||
704 | static void __exit kovaplus_exit(void) | 704 | static void __exit kovaplus_exit(void) |
705 | { | 705 | { |
706 | class_destroy(kovaplus_class); | ||
707 | hid_unregister_driver(&kovaplus_driver); | 706 | hid_unregister_driver(&kovaplus_driver); |
707 | class_destroy(kovaplus_class); | ||
708 | } | 708 | } |
709 | 709 | ||
710 | module_init(kovaplus_init); | 710 | module_init(kovaplus_init); |