diff options
Diffstat (limited to 'drivers/usb/core/driver.c')
-rw-r--r-- | drivers/usb/core/driver.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c index fca61720b873..38072e4e74bd 100644 --- a/drivers/usb/core/driver.c +++ b/drivers/usb/core/driver.c | |||
@@ -1659,6 +1659,11 @@ static int usb_runtime_suspend(struct device *dev) | |||
1659 | return -EAGAIN; | 1659 | return -EAGAIN; |
1660 | 1660 | ||
1661 | status = usb_suspend_both(udev, PMSG_AUTO_SUSPEND); | 1661 | status = usb_suspend_both(udev, PMSG_AUTO_SUSPEND); |
1662 | /* The PM core reacts badly unless the return code is 0, | ||
1663 | * -EAGAIN, or -EBUSY, so always return -EBUSY on an error. | ||
1664 | */ | ||
1665 | if (status != 0) | ||
1666 | return -EBUSY; | ||
1662 | return status; | 1667 | return status; |
1663 | } | 1668 | } |
1664 | 1669 | ||