diff options
Diffstat (limited to 'drivers/usb/core/hcd.c')
-rw-r--r-- | drivers/usb/core/hcd.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index bc84106ac057..75ba2091f9b4 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c | |||
@@ -1011,10 +1011,7 @@ static int register_root_hub(struct usb_hcd *hcd) | |||
1011 | if (retval) { | 1011 | if (retval) { |
1012 | dev_err (parent_dev, "can't register root hub for %s, %d\n", | 1012 | dev_err (parent_dev, "can't register root hub for %s, %d\n", |
1013 | dev_name(&usb_dev->dev), retval); | 1013 | dev_name(&usb_dev->dev), retval); |
1014 | } | 1014 | } else { |
1015 | mutex_unlock(&usb_bus_list_lock); | ||
1016 | |||
1017 | if (retval == 0) { | ||
1018 | spin_lock_irq (&hcd_root_hub_lock); | 1015 | spin_lock_irq (&hcd_root_hub_lock); |
1019 | hcd->rh_registered = 1; | 1016 | hcd->rh_registered = 1; |
1020 | spin_unlock_irq (&hcd_root_hub_lock); | 1017 | spin_unlock_irq (&hcd_root_hub_lock); |
@@ -1023,6 +1020,7 @@ static int register_root_hub(struct usb_hcd *hcd) | |||
1023 | if (HCD_DEAD(hcd)) | 1020 | if (HCD_DEAD(hcd)) |
1024 | usb_hc_died (hcd); /* This time clean up */ | 1021 | usb_hc_died (hcd); /* This time clean up */ |
1025 | } | 1022 | } |
1023 | mutex_unlock(&usb_bus_list_lock); | ||
1026 | 1024 | ||
1027 | return retval; | 1025 | return retval; |
1028 | } | 1026 | } |