summaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/hub.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2014-09-22 11:57:32 -0600
committerJens Axboe <axboe@fb.com>2014-09-22 11:57:32 -0600
commit6d11fb454b161a4565c57be6f1c5527235741003 (patch)
treec238ed3df2f654181c2a0746478a33b32214cc60 /drivers/usb/core/hub.c
parentb207892b061da7608878e273ae22ba9bf9be264b (diff)
parent8b95741569eabc5eb17da71d1d3668cdb0bef86c (diff)
downloadlinux-6d11fb454b161a4565c57be6f1c5527235741003.tar.gz
linux-6d11fb454b161a4565c57be6f1c5527235741003.tar.bz2
linux-6d11fb454b161a4565c57be6f1c5527235741003.zip
Merge branch 'for-linus' into for-3.18/core
Moving patches from for-linus to 3.18 instead, pull in this changes that will go to Linus today.
Diffstat (limited to 'drivers/usb/core/hub.c')
-rw-r--r--drivers/usb/core/hub.c4
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)
hub = list_entry(tmp, struct usb_hub, event_list);
kref_get(&hub->kref);
+ hdev = hub->hdev;
+ usb_get_dev(hdev);
spin_unlock_irq(&hub_event_lock);
- hdev = hub->hdev;
hub_dev = hub->intfdev;
intf = to_usb_interface(hub_dev);
dev_dbg(hub_dev, "state %d ports %d chg %04x evt %04x\n",
@@ -5139,6 +5140,7 @@ static void hub_events(void)
usb_autopm_put_interface(intf);
loop_disconnected:
usb_unlock_device(hdev);
+ usb_put_dev(hdev);
kref_put(&hub->kref, hub_release);
} /* end while (1) */