Commit bb16c313 authored by Vojtech Pavlik's avatar Vojtech Pavlik

usb hid driver:

	- patch to fix bug where urbs were freed too soon.
parent d96835d3
...@@ -1431,15 +1431,10 @@ static void hid_disconnect(struct usb_device *dev, void *ptr) ...@@ -1431,15 +1431,10 @@ static void hid_disconnect(struct usb_device *dev, void *ptr)
{ {
struct hid_device *hid = ptr; struct hid_device *hid = ptr;
dbg("cleanup called");
usb_unlink_urb(hid->urbin); usb_unlink_urb(hid->urbin);
usb_unlink_urb(hid->urbout); usb_unlink_urb(hid->urbout);
usb_unlink_urb(hid->urbctrl); usb_unlink_urb(hid->urbctrl);
usb_free_urb(hid->urbin);
usb_free_urb(hid->urbctrl);
if (hid->urbout)
usb_free_urb(hid->urbout);
if (hid->claimed & HID_CLAIMED_INPUT) if (hid->claimed & HID_CLAIMED_INPUT)
hidinput_disconnect(hid); hidinput_disconnect(hid);
...@@ -1447,6 +1442,12 @@ static void hid_disconnect(struct usb_device *dev, void *ptr) ...@@ -1447,6 +1442,12 @@ static void hid_disconnect(struct usb_device *dev, void *ptr)
if (hid->claimed & HID_CLAIMED_HIDDEV) if (hid->claimed & HID_CLAIMED_HIDDEV)
hiddev_disconnect(hid); hiddev_disconnect(hid);
#endif #endif
usb_free_urb(hid->urbin);
usb_free_urb(hid->urbctrl);
if (hid->urbout)
usb_free_urb(hid->urbout);
hid_free_device(hid); hid_free_device(hid);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment