mirror of
https://github.com/sysprog21/lkmpg.git
synced 2024-11-22 04:09:18 +08:00
Fix incorrect failure handling in vinput_init
After class_register failure, the wrong function class_unregister was used. The correct cleanup function should be unregister_chrdev, as register_chrdev was used before class_register.
This commit is contained in:
parent
e2b1756efc
commit
9b89d0ca04
|
@ -401,7 +401,7 @@ static int __init vinput_init(void)
|
|||
|
||||
return 0;
|
||||
failed_class:
|
||||
class_unregister(&vinput_class);
|
||||
unregister_chrdev(vinput_dev, DRIVER_NAME);
|
||||
failed_alloc:
|
||||
return err;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user