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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Oct 2019 06:26:01 +0000 (08:26 +0200)
commit3e785174fb35ccc89cb40ef1687d1f1df2fc4326
tree373257b26d32e9c2be5ef379a781b5f09b6878e7
parenteb77929769e3d24a10582aa6bdb3bad3e8499b58
HID: sony: Fix memory corruption issue on cleanup.

commit 2bcdacb70327013ca2066bfcf2af1009eff01f1d upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hid/hid-sony.c