diff options
-rw-r--r-- | drivers/usb/core/driver.c | 3 | ||||
-rw-r--r-- | drivers/usb/core/hub.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c index e935be7eb46..3d7793d9303 100644 --- a/drivers/usb/core/driver.c +++ b/drivers/usb/core/driver.c @@ -1610,7 +1610,8 @@ int usb_external_resume_device(struct usb_device *udev) status = usb_resume_both(udev); udev->last_busy = jiffies; usb_pm_unlock(udev); - do_unbind_rebind(udev, DO_REBIND); + if (status == 0) + do_unbind_rebind(udev, DO_REBIND); /* Now that the device is awake, we can start trying to autosuspend * it again. */ diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index d73ce262c36..9b3f16bd12c 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -3504,7 +3504,7 @@ int usb_reset_device(struct usb_device *udev) USB_INTERFACE_BOUND) rebind = 1; } - if (rebind) + if (ret == 0 && rebind) usb_rebind_intf(cintf); } } |