]> git.baikalelectronics.ru Git - kernel.git/commit
HID: wacom: release the resources before leaving despite devm
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>
Fri, 20 Jan 2017 15:20:11 +0000 (16:20 +0100)
committerJiri Kosina <jkosina@suse.cz>
Mon, 23 Jan 2017 10:00:13 +0000 (11:00 +0100)
commit5221d1622f002ffd4722f05082868d7608162f00
tree9f4d6135d0af6022e0c8b5152bf6d4f4a69cb1f7
parent502784c8584a9e19361be249ba1c6c1709664745
HID: wacom: release the resources before leaving despite devm

In the general case, the resources are properly released by devm without
needing to do anything. However, when unplugging the wireless receiver,
the kernel segfaults from time to time while calling devres_release_all().

I think in that case the resources attempt to access hid_get_drvdata(hdev)
which has been set to null while leaving wacom_remove().

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Acked-by: Jason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/wacom_sys.c