Skip to content

Commit

Permalink
usb: hid-core free urb cleanup
Browse files Browse the repository at this point in the history
- usb_free_urb() cleanup

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Mariusz Kozlowski authored and Greg Kroah-Hartman committed Dec 1, 2006
1 parent 2381526 commit 6f07429
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions drivers/usb/input/hid-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2080,13 +2080,9 @@ static struct hid_device *usb_hid_configure(struct usb_interface *intf)
return hid;

fail:

if (hid->urbin)
usb_free_urb(hid->urbin);
if (hid->urbout)
usb_free_urb(hid->urbout);
if (hid->urbctrl)
usb_free_urb(hid->urbctrl);
usb_free_urb(hid->urbin);
usb_free_urb(hid->urbout);
usb_free_urb(hid->urbctrl);
hid_free_buffers(dev, hid);
hid_free_device(hid);

Expand Down Expand Up @@ -2117,8 +2113,7 @@ static void hid_disconnect(struct usb_interface *intf)

usb_free_urb(hid->urbin);
usb_free_urb(hid->urbctrl);
if (hid->urbout)
usb_free_urb(hid->urbout);
usb_free_urb(hid->urbout);

hid_free_buffers(hid->dev, hid);
hid_free_device(hid);
Expand Down

0 comments on commit 6f07429

Please sign in to comment.