From 6f07429fa295a04e06c93601e6c597e7a6d95495 Mon Sep 17 00:00:00 2001 From: Mariusz Kozlowski Date: Wed, 8 Nov 2006 15:35:54 +0100 Subject: usb: hid-core free urb cleanup - usb_free_urb() cleanup Signed-off-by: Mariusz Kozlowski Signed-off-by: Greg Kroah-Hartman --- drivers/usb/input/hid-core.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'drivers/usb/input') diff --git a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c index 2c12b04da111..f7a67c4db515 100644 --- a/drivers/usb/input/hid-core.c +++ b/drivers/usb/input/hid-core.c @@ -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); @@ -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); -- cgit v1.2.3