We can't call hid_free_buffers() when the underlying usbhid_device
has already been freed.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
usb_free_urb(usbhid->urbin);
usb_free_urb(usbhid->urbout);
usb_free_urb(usbhid->urbctrl);
+ hid_free_buffers(dev, hid);
kfree(usbhid);
fail_no_usbhid:
- hid_free_buffers(dev, hid);
hid_free_device(hid);
return NULL;
usb_free_urb(usbhid->urbin);
usb_free_urb(usbhid->urbctrl);
usb_free_urb(usbhid->urbout);
- kfree(usbhid);
hid_free_buffers(hid_to_usb_dev(hid), hid);
+ kfree(usbhid);
hid_free_device(hid);
}