HID: sony: Fix memory corruption issue on cleanup.
authorRoderick Colenbrander <roderick.colenbrander@sony.com>
Wed, 4 Sep 2019 21:22:11 +0000 (14:22 -0700)
committerJiri Kosina <jkosina@suse.cz>
Thu, 5 Sep 2019 12:27:14 +0000 (14:27 +0200)
commit2bcdacb70327013ca2066bfcf2af1009eff01f1d
tree2b2b8fb90f099fbef9ac4fc366415df369c88957
parentb20bef4b4be8a0a031049cc552c52e9d4e70ef00
HID: sony: Fix memory corruption issue on cleanup.

The sony driver is not properly cleaning up from potential failures in
sony_input_configured. Currently it calls hid_hw_stop, while hid_connect
is still running. This is not a good idea, instead hid_hw_stop should
be moved to sony_probe. Similar changes were recently made to Logitech
drivers, which were also doing improper cleanup.

Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
CC: stable@vger.kernel.org
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-sony.c