Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=22f675f320f721e9eaa2bbf7b883316b408c6c8f
Commit:     22f675f320f721e9eaa2bbf7b883316b408c6c8f
Parent:     cda5ecf80bad94b4113722f037af818e7453dd2d
Author:     Jiri Kosina <[EMAIL PROTECTED]>
AuthorDate: Wed Aug 1 12:32:27 2007 +0200
Committer:  Jiri Kosina <[EMAIL PROTECTED]>
CommitDate: Thu Aug 2 13:48:04 2007 +0200

    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 <[EMAIL PROTECTED]>
---
 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 6e73934..0a1f2b5 100644
--- a/drivers/hid/usbhid/hid-core.c
+++ b/drivers/hid/usbhid/hid-core.c
@@ -877,9 +877,9 @@ fail:
        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;
@@ -913,9 +913,9 @@ static void hid_disconnect(struct usb_interface *intf)
        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);
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to