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>
static void __exit arvo_exit(void)
{
- class_destroy(arvo_class);
hid_unregister_driver(&arvo_driver);
+ class_destroy(arvo_class);
}
module_init(arvo_init);
static void __exit kone_exit(void)
{
- class_destroy(kone_class);
hid_unregister_driver(&kone_driver);
+ class_destroy(kone_class);
}
module_init(kone_init);
static void __exit koneplus_exit(void)
{
- class_destroy(koneplus_class);
hid_unregister_driver(&koneplus_driver);
+ class_destroy(koneplus_class);
}
module_init(koneplus_init);
static void __exit kovaplus_exit(void)
{
- class_destroy(kovaplus_class);
hid_unregister_driver(&kovaplus_driver);
+ class_destroy(kovaplus_class);
}
module_init(kovaplus_init);
static void __exit pyra_exit(void)
{
- class_destroy(pyra_class);
hid_unregister_driver(&pyra_driver);
+ class_destroy(pyra_class);
}
module_init(pyra_init);