From aa9d7ad111b241470981e77c9c3f45ce8da9ca69 Mon Sep 17 00:00:00 2001 From: Sarah Sharp Date: Wed, 29 Dec 2010 22:03:07 -0800 Subject: [PATCH] --- yaml --- r: 235413 b: refs/heads/master c: db7c7c0aeef51dba12d877875b8deb78d9886647 h: refs/heads/master i: 235411: 1ebacb6ce44df76657460411ea11487cf0943b6a v: v3 --- [refs] | 2 +- trunk/drivers/usb/core/driver.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 3441da91efd6..045c7040eab6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: fbf9865c6d96f4a131092d2018056e86113e5cea +refs/heads/master: db7c7c0aeef51dba12d877875b8deb78d9886647 diff --git a/trunk/drivers/usb/core/driver.c b/trunk/drivers/usb/core/driver.c index fca61720b873..38072e4e74bd 100644 --- a/trunk/drivers/usb/core/driver.c +++ b/trunk/drivers/usb/core/driver.c @@ -1659,6 +1659,11 @@ static int usb_runtime_suspend(struct device *dev) return -EAGAIN; status = usb_suspend_both(udev, PMSG_AUTO_SUSPEND); + /* The PM core reacts badly unless the return code is 0, + * -EAGAIN, or -EBUSY, so always return -EBUSY on an error. + */ + if (status != 0) + return -EBUSY; return status; }