aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/core/driver.c')
-rw-r--r--drivers/usb/core/driver.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c
index 4aeb10034de7..9bffd26cea05 100644
--- a/drivers/usb/core/driver.c
+++ b/drivers/usb/core/driver.c
@@ -417,10 +417,11 @@ static int usb_unbind_interface(struct device *dev)
417 */ 417 */
418 lpm_disable_error = usb_unlocked_disable_lpm(udev); 418 lpm_disable_error = usb_unlocked_disable_lpm(udev);
419 419
420 /* Terminate all URBs for this interface unless the driver 420 /*
421 * supports "soft" unbinding. 421 * Terminate all URBs for this interface unless the driver
422 * supports "soft" unbinding and the device is still present.
422 */ 423 */
423 if (!driver->soft_unbind) 424 if (!driver->soft_unbind || udev->state == USB_STATE_NOTATTACHED)
424 usb_disable_interface(udev, intf, false); 425 usb_disable_interface(udev, intf, false);
425 426
426 driver->disconnect(intf); 427 driver->disconnect(intf);