aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/image
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/image')
-rw-r--r--drivers/usb/image/mdc800.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/image/mdc800.c b/drivers/usb/image/mdc800.c
index 63a84bbc310d..d308afd06935 100644
--- a/drivers/usb/image/mdc800.c
+++ b/drivers/usb/image/mdc800.c
@@ -565,11 +565,15 @@ static void mdc800_usb_disconnect (struct usb_interface *intf)
565 565
566 usb_deregister_dev(intf, &mdc800_class); 566 usb_deregister_dev(intf, &mdc800_class);
567 567
568 /* must be under lock to make sure no URB
569 is submitted after usb_kill_urb() */
570 mutex_lock(&mdc800->io_lock);
568 mdc800->state=NOT_CONNECTED; 571 mdc800->state=NOT_CONNECTED;
569 572
570 usb_kill_urb(mdc800->irq_urb); 573 usb_kill_urb(mdc800->irq_urb);
571 usb_kill_urb(mdc800->write_urb); 574 usb_kill_urb(mdc800->write_urb);
572 usb_kill_urb(mdc800->download_urb); 575 usb_kill_urb(mdc800->download_urb);
576 mutex_unlock(&mdc800->io_lock);
573 577
574 mdc800->dev = NULL; 578 mdc800->dev = NULL;
575 usb_set_intfdata(intf, NULL); 579 usb_set_intfdata(intf, NULL);