diff options
Diffstat (limited to 'drivers/usb/input/yealink.c')
-rw-r--r-- | drivers/usb/input/yealink.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/usb/input/yealink.c b/drivers/usb/input/yealink.c index 24aedbb20f03..7291e7a2717b 100644 --- a/drivers/usb/input/yealink.c +++ b/drivers/usb/input/yealink.c | |||
@@ -46,7 +46,6 @@ | |||
46 | * 20050816 henk Merge 2.6.13-rc6 | 46 | * 20050816 henk Merge 2.6.13-rc6 |
47 | */ | 47 | */ |
48 | 48 | ||
49 | #include <linux/config.h> | ||
50 | #include <linux/kernel.h> | 49 | #include <linux/kernel.h> |
51 | #include <linux/init.h> | 50 | #include <linux/init.h> |
52 | #include <linux/slab.h> | 51 | #include <linux/slab.h> |
@@ -811,12 +810,9 @@ static int usb_cleanup(struct yealink_dev *yld, int err) | |||
811 | if (yld == NULL) | 810 | if (yld == NULL) |
812 | return err; | 811 | return err; |
813 | 812 | ||
814 | if (yld->urb_irq) { | 813 | usb_kill_urb(yld->urb_irq); /* parameter validation in core/urb */ |
815 | usb_kill_urb(yld->urb_irq); | 814 | usb_kill_urb(yld->urb_ctl); /* parameter validation in core/urb */ |
816 | usb_free_urb(yld->urb_irq); | 815 | |
817 | } | ||
818 | if (yld->urb_ctl) | ||
819 | usb_free_urb(yld->urb_ctl); | ||
820 | if (yld->idev) { | 816 | if (yld->idev) { |
821 | if (err) | 817 | if (err) |
822 | input_free_device(yld->idev); | 818 | input_free_device(yld->idev); |
@@ -832,6 +828,9 @@ static int usb_cleanup(struct yealink_dev *yld, int err) | |||
832 | if (yld->irq_data) | 828 | if (yld->irq_data) |
833 | usb_buffer_free(yld->udev, USB_PKT_LEN, | 829 | usb_buffer_free(yld->udev, USB_PKT_LEN, |
834 | yld->irq_data, yld->irq_dma); | 830 | yld->irq_data, yld->irq_dma); |
831 | |||
832 | usb_free_urb(yld->urb_irq); /* parameter validation in core/urb */ | ||
833 | usb_free_urb(yld->urb_ctl); /* parameter validation in core/urb */ | ||
835 | kfree(yld); | 834 | kfree(yld); |
836 | return err; | 835 | return err; |
837 | } | 836 | } |
@@ -972,7 +971,7 @@ static int usb_probe(struct usb_interface *intf, const struct usb_device_id *id) | |||
972 | DRIVER_VERSION, sizeof(DRIVER_VERSION)); | 971 | DRIVER_VERSION, sizeof(DRIVER_VERSION)); |
973 | 972 | ||
974 | /* Register sysfs hooks (don't care about failure) */ | 973 | /* Register sysfs hooks (don't care about failure) */ |
975 | sysfs_create_group(&intf->dev.kobj, &yld_attr_group); | 974 | ret = sysfs_create_group(&intf->dev.kobj, &yld_attr_group); |
976 | return 0; | 975 | return 0; |
977 | } | 976 | } |
978 | 977 | ||