]> git.baikalelectronics.ru Git - kernel.git/commit
HID: fix start/stop cycle in usbhid driver
authorJiri Slaby <jirislaby@gmail.com>
Sat, 1 Nov 2008 22:41:46 +0000 (23:41 +0100)
committerJiri Kosina <jkosina@suse.cz>
Thu, 13 Nov 2008 09:31:36 +0000 (10:31 +0100)
commitc5ac5771bc31e7b9e9a961248d35b79ca06b8913
treeb6878bf88a22d12e0cad3fec63e5ccfa7217f921
parentfd0936557631a416b0761d9178448e664f9e653c
HID: fix start/stop cycle in usbhid driver

`stop' left out usbhid->urb* pointers and so the next `start' thought
it needs to allocate nothing and used the memory pointers previously
pointed to. This led to memory corruption and device malfunction.

Also don't forget to clear disconnect flag on start which was left set
by the previous `stop'.

This fixes

echo DEVICE > /sys/bus/hid/drivers/DRIVER/unbind
echo DEVICE > /sys/bus/hid/drivers/DRIVER/bind

failures.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/usbhid/hid-core.c