From ca7b42434a6b22b3e6438ffe32ea8325bd01ecaf Mon Sep 17 00:00:00 2001 From: Alan Stern Date: Tue, 21 Oct 2008 15:40:03 -0400 Subject: [PATCH] --- yaml --- r: 117172 b: refs/heads/master c: 6c6409459a18a825ce12ecb003d5686af61f7a2f h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/usb/core/driver.c | 3 ++- trunk/drivers/usb/core/hub.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 1f855fd9ecf1..c92a9bc148e1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a496c64f1363ec4d67ebdc1e1f619ad6372a574c +refs/heads/master: 6c6409459a18a825ce12ecb003d5686af61f7a2f diff --git a/trunk/drivers/usb/core/driver.c b/trunk/drivers/usb/core/driver.c index e935be7eb468..3d7793d93031 100644 --- a/trunk/drivers/usb/core/driver.c +++ b/trunk/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/trunk/drivers/usb/core/hub.c b/trunk/drivers/usb/core/hub.c index d73ce262c365..9b3f16bd12cb 100644 --- a/trunk/drivers/usb/core/hub.c +++ b/trunk/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); } }