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) | |||
| 1610 | status = usb_resume_both(udev); | 1610 | status = usb_resume_both(udev); |
| 1611 | udev->last_busy = jiffies; | 1611 | udev->last_busy = jiffies; |
| 1612 | usb_pm_unlock(udev); | 1612 | usb_pm_unlock(udev); |
| 1613 | do_unbind_rebind(udev, DO_REBIND); | 1613 | if (status == 0) |
| 1614 | do_unbind_rebind(udev, DO_REBIND); | ||
| 1614 | 1615 | ||
| 1615 | /* Now that the device is awake, we can start trying to autosuspend | 1616 | /* Now that the device is awake, we can start trying to autosuspend |
| 1616 | * it again. */ | 1617 | * 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) | |||
| 3504 | USB_INTERFACE_BOUND) | 3504 | USB_INTERFACE_BOUND) |
| 3505 | rebind = 1; | 3505 | rebind = 1; |
| 3506 | } | 3506 | } |
| 3507 | if (rebind) | 3507 | if (ret == 0 && rebind) |
| 3508 | usb_rebind_intf(cintf); | 3508 | usb_rebind_intf(cintf); |
| 3509 | } | 3509 | } |
| 3510 | } | 3510 | } |
