Skip to content
  • Jiri Slaby's avatar
    HID: fix start/stop cycle in usbhid driver · e3e14de5
    Jiri Slaby authored
    
    
    `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: default avatarJiri Slaby <jirislaby@gmail.com>
    Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
    e3e14de5