aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-roccat-arvo.c
diff options
context:
space:
mode:
authorStefan Achatz <erazor_de@users.sourceforge.net>2011-01-30 07:38:27 -0500
committerJiri Kosina <jkosina@suse.cz>2011-02-03 10:37:28 -0500
commit74b643dac475e29f53f4132d2349ec1dba3c9e44 (patch)
tree7dc09d1d853a01fcade0255dd56c9e07b40c92c1 /drivers/hid/hid-roccat-arvo.c
parent8211e46004518c977f70f2661da961d5ba617399 (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-arvo.c')
-rw-r--r--drivers/hid/hid-roccat-arvo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/hid-roccat-arvo.c b/drivers/hid/hid-roccat-arvo.c
index 7b9a992611bc..75f532f4d4cc 100644
--- a/drivers/hid/hid-roccat-arvo.c
+++ b/drivers/hid/hid-roccat-arvo.c
@@ -438,8 +438,8 @@ static int __init arvo_init(void)
438 438
439static void __exit arvo_exit(void) 439static void __exit arvo_exit(void)
440{ 440{
441 class_destroy(arvo_class);
442 hid_unregister_driver(&arvo_driver); 441 hid_unregister_driver(&arvo_driver);
442 class_destroy(arvo_class);
443} 443}
444 444
445module_init(arvo_init); 445module_init(arvo_init);