mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
HID: sony: Fix input device leak when connecting a DS4 twice using USB/BT
When a user connects a DS4 twice using USB and BT, we reject the
second device connection after the setup work. We then perform
a cleanup, but during cleanup we are not removing the touchpad
device. This leads to leakage of an input device, which we would
never remove. It can likely result into a kernel oops as well
when the touchpad evdev node is accessed and the underlaying HID
device has been removed from the system.
[[email protected]: added stable annotation]
Fixes: ac797b95f5 ("HID: sony: Make the DS4 touchpad a separate device")
Cc: [email protected]
Signed-off-by: Roderick Colenbrander <[email protected]>
Reviewed-by: Benjamin Tissoires <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
This commit is contained in:
parent
f2f10b7e72
commit
a687c5765b
1 changed files with 2 additions and 0 deletions
|
|
@ -2632,6 +2632,8 @@ err_stop:
|
|||
sony_leds_remove(sc);
|
||||
if (sc->quirks & SONY_BATTERY_SUPPORT)
|
||||
sony_battery_remove(sc);
|
||||
if (sc->touchpad)
|
||||
sony_unregister_touchpad(sc);
|
||||
sony_cancel_work_sync(sc);
|
||||
kfree(sc->output_report_dmabuf);
|
||||
sony_remove_dev_list(sc);
|
||||
|
|
|
|||
Loading…
Reference in a new issue