diff options
author | Jiri Kosina <jkosina@suse.cz> | 2007-08-01 06:32:27 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2007-08-02 07:48:04 -0400 |
commit | 22f675f320f721e9eaa2bbf7b883316b408c6c8f (patch) | |
tree | c9fc673b85a3893115feaeb6bae36745cfecced5 /drivers/hid/usbhid | |
parent | cda5ecf80bad94b4113722f037af818e7453dd2d (diff) |
HID: Never call hid_free_buffers() when usbhid_device has been freed
We can't call hid_free_buffers() when the underlying usbhid_device
has already been freed.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/usbhid')
-rw-r--r-- | drivers/hid/usbhid/hid-core.c | 4 |
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); |
881 | fail_no_usbhid: | 882 | fail_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 | ||