aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/core/driver.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c
index 2b2000ac05ab..0d063c8ca4b4 100644
--- a/drivers/usb/core/driver.c
+++ b/drivers/usb/core/driver.c
@@ -1071,10 +1071,15 @@ int usb_resume_both(struct usb_device *udev)
1071 PM_EVENT_ON) 1071 PM_EVENT_ON)
1072 status = -EHOSTUNREACH; 1072 status = -EHOSTUNREACH;
1073 } 1073 }
1074 if (status == 0 && udev->state == USB_STATE_SUSPENDED) 1074 if (status == 0)
1075 status = resume_device(udev); 1075 status = resume_device(udev);
1076 if (parent) 1076 if (parent)
1077 mutex_unlock(&parent->pm_mutex); 1077 mutex_unlock(&parent->pm_mutex);
1078 } else {
1079
1080 /* Needed only for setting udev->dev.power.power_state.event
1081 * and for possible debugging message. */
1082 status = resume_device(udev);
1078 } 1083 }
1079 1084
1080 /* Now the parent won't suspend until we are finished */ 1085 /* Now the parent won't suspend until we are finished */