aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/input/yealink.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/input/yealink.c')
-rw-r--r--drivers/usb/input/yealink.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/drivers/usb/input/yealink.c b/drivers/usb/input/yealink.c
index c54f1a5dcb4a..fc645b299189 100644
--- a/drivers/usb/input/yealink.c
+++ b/drivers/usb/input/yealink.c
@@ -818,18 +818,17 @@ static int usb_cleanup(struct yealink_dev *yld, int err)
818 else 818 else
819 input_unregister_device(yld->idev); 819 input_unregister_device(yld->idev);
820 } 820 }
821 if (yld->ctl_req) 821
822 usb_buffer_free(yld->udev, sizeof(*(yld->ctl_req)), 822 usb_free_urb(yld->urb_irq);
823 yld->ctl_req, yld->ctl_req_dma); 823 usb_free_urb(yld->urb_ctl);
824 if (yld->ctl_data) 824
825 usb_buffer_free(yld->udev, USB_PKT_LEN, 825 usb_buffer_free(yld->udev, sizeof(*(yld->ctl_req)),
826 yld->ctl_data, yld->ctl_dma); 826 yld->ctl_req, yld->ctl_req_dma);
827 if (yld->irq_data) 827 usb_buffer_free(yld->udev, USB_PKT_LEN,
828 usb_buffer_free(yld->udev, USB_PKT_LEN, 828 yld->ctl_data, yld->ctl_dma);
829 yld->irq_data, yld->irq_dma); 829 usb_buffer_free(yld->udev, USB_PKT_LEN,
830 830 yld->irq_data, yld->irq_dma);
831 usb_free_urb(yld->urb_irq); /* parameter validation in core/urb */ 831
832 usb_free_urb(yld->urb_ctl); /* parameter validation in core/urb */
833 kfree(yld); 832 kfree(yld);
834 return err; 833 return err;
835} 834}