diff options
Diffstat (limited to 'drivers/usb/core/hub.c')
-rw-r--r-- | drivers/usb/core/hub.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 46f5161c7891..d481c99a20d7 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
@@ -5024,9 +5024,10 @@ static void hub_events(void) | |||
5024 | 5024 | ||
5025 | hub = list_entry(tmp, struct usb_hub, event_list); | 5025 | hub = list_entry(tmp, struct usb_hub, event_list); |
5026 | kref_get(&hub->kref); | 5026 | kref_get(&hub->kref); |
5027 | hdev = hub->hdev; | ||
5028 | usb_get_dev(hdev); | ||
5027 | spin_unlock_irq(&hub_event_lock); | 5029 | spin_unlock_irq(&hub_event_lock); |
5028 | 5030 | ||
5029 | hdev = hub->hdev; | ||
5030 | hub_dev = hub->intfdev; | 5031 | hub_dev = hub->intfdev; |
5031 | intf = to_usb_interface(hub_dev); | 5032 | intf = to_usb_interface(hub_dev); |
5032 | dev_dbg(hub_dev, "state %d ports %d chg %04x evt %04x\n", | 5033 | dev_dbg(hub_dev, "state %d ports %d chg %04x evt %04x\n", |
@@ -5139,6 +5140,7 @@ static void hub_events(void) | |||
5139 | usb_autopm_put_interface(intf); | 5140 | usb_autopm_put_interface(intf); |
5140 | loop_disconnected: | 5141 | loop_disconnected: |
5141 | usb_unlock_device(hdev); | 5142 | usb_unlock_device(hdev); |
5143 | usb_put_dev(hdev); | ||
5142 | kref_put(&hub->kref, hub_release); | 5144 | kref_put(&hub->kref, hub_release); |
5143 | 5145 | ||
5144 | } /* end while (1) */ | 5146 | } /* end while (1) */ |