mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-04-03 04:43:55 +00:00
HID: wacom: NULL dereferences on error in probe()
We can't pass a NULL to input_unregister_device().
Fixes: 2a6cdbdd4c
('HID: wacom: Introduce new 'touch_input' device')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
parent
67db8a8086
commit
0fd72ff92d
1 changed files with 4 additions and 2 deletions
|
@ -1271,10 +1271,12 @@ fail_leds:
|
||||||
pad_input_dev = NULL;
|
pad_input_dev = NULL;
|
||||||
wacom_wac->pad_registered = false;
|
wacom_wac->pad_registered = false;
|
||||||
fail_register_pad_input:
|
fail_register_pad_input:
|
||||||
|
if (touch_input_dev)
|
||||||
input_unregister_device(touch_input_dev);
|
input_unregister_device(touch_input_dev);
|
||||||
wacom_wac->touch_input = NULL;
|
wacom_wac->touch_input = NULL;
|
||||||
wacom_wac->touch_registered = false;
|
wacom_wac->touch_registered = false;
|
||||||
fail_register_touch_input:
|
fail_register_touch_input:
|
||||||
|
if (pen_input_dev)
|
||||||
input_unregister_device(pen_input_dev);
|
input_unregister_device(pen_input_dev);
|
||||||
wacom_wac->pen_input = NULL;
|
wacom_wac->pen_input = NULL;
|
||||||
wacom_wac->pen_registered = false;
|
wacom_wac->pen_registered = false;
|
||||||
|
|
Loading…
Add table
Reference in a new issue