mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-11 15:49:56 +00:00
HID: kernel oops in out_cleanup in function hidinput_connect
Goto out_cleanup infers a kernel oops: hidinput_disconnect calls input_unregister_driver to all members of hid->inputs. However, hidinput already has been added to hid->inputs even though input_register_device was not called. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr> Reviewed-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
parent
6497dc3a54
commit
d9236303d0
@ -928,6 +928,7 @@ int hidinput_connect(struct hid_device *hid, unsigned int force)
|
||||
return 0;
|
||||
|
||||
out_cleanup:
|
||||
list_del(&hidinput->list);
|
||||
input_free_device(hidinput->input);
|
||||
kfree(hidinput);
|
||||
out_unwind:
|
||||
|
Loading…
x
Reference in New Issue
Block a user