aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/hid/usbhid/hid-core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
index 6e7393460ead..0a1f2b52a12f 100644
--- a/drivers/hid/usbhid/hid-core.c
+++ b/drivers/hid/usbhid/hid-core.c
@@ -877,9 +877,9 @@ fail:
877 usb_free_urb(usbhid->urbin); 877 usb_free_urb(usbhid->urbin);
878 usb_free_urb(usbhid->urbout); 878 usb_free_urb(usbhid->urbout);
879 usb_free_urb(usbhid->urbctrl); 879 usb_free_urb(usbhid->urbctrl);
880 hid_free_buffers(dev, hid);
880 kfree(usbhid); 881 kfree(usbhid);
881fail_no_usbhid: 882fail_no_usbhid:
882 hid_free_buffers(dev, hid);
883 hid_free_device(hid); 883 hid_free_device(hid);
884 884
885 return NULL; 885 return NULL;
@@ -913,9 +913,9 @@ static void hid_disconnect(struct usb_interface *intf)
913 usb_free_urb(usbhid->urbin); 913 usb_free_urb(usbhid->urbin);
914 usb_free_urb(usbhid->urbctrl); 914 usb_free_urb(usbhid->urbctrl);
915 usb_free_urb(usbhid->urbout); 915 usb_free_urb(usbhid->urbout);
916 kfree(usbhid);
917 916
918 hid_free_buffers(hid_to_usb_dev(hid), hid); 917 hid_free_buffers(hid_to_usb_dev(hid), hid);
918 kfree(usbhid);
919 hid_free_device(hid); 919 hid_free_device(hid);
920} 920}
921 921