diff options
author | Benjamin Tissoires <benjamin.tissoires@enac.fr> | 2011-02-15 09:41:10 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2011-02-15 17:47:05 -0500 |
commit | d9236303d0b7ba8bbaeb6adbbf088c3fe2a9ab9e (patch) | |
tree | 24e2ca2a398484c986ab3b991a3487ac4c09f518 /drivers/hid | |
parent | 6497dc3a5473a0a7948765c45c3dad9ef0395b28 (diff) |
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>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/hid-input.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 7f552bfad32c..f53911dcdc2d 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c | |||
@@ -928,6 +928,7 @@ int hidinput_connect(struct hid_device *hid, unsigned int force) | |||
928 | return 0; | 928 | return 0; |
929 | 929 | ||
930 | out_cleanup: | 930 | out_cleanup: |
931 | list_del(&hidinput->list); | ||
931 | input_free_device(hidinput->input); | 932 | input_free_device(hidinput->input); |
932 | kfree(hidinput); | 933 | kfree(hidinput); |
933 | out_unwind: | 934 | out_unwind: |