Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 323201
b: refs/heads/master
c: 0d00dc2
h: refs/heads/master
i:
  323199: 35d3280
v: v3
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed Sep 27, 2012
1 parent 25e3116 commit 42ee53d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 01bb6501779ed0b6dc6c55be34b49eaa6306fdd8
refs/heads/master: 0d00dc2611abbe6ad244d50569c2ee82ce42846c
2 changes: 1 addition & 1 deletion trunk/drivers/usb/core/devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ static ssize_t usb_device_read(struct file *file, char __user *buf,
/* print devices for all busses */
list_for_each_entry(bus, &usb_bus_list, bus_list) {
/* recurse through all children of the root hub */
if (!bus->root_hub)
if (!bus_to_hcd(bus)->rh_registered)
continue;
usb_lock_device(bus->root_hub);
ret = usb_device_dump(&buf, &nbytes, &skip_bytes, ppos,
Expand Down
6 changes: 2 additions & 4 deletions trunk/drivers/usb/core/hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1011,10 +1011,7 @@ static int register_root_hub(struct usb_hcd *hcd)
if (retval) {
dev_err (parent_dev, "can't register root hub for %s, %d\n",
dev_name(&usb_dev->dev), retval);
}
mutex_unlock(&usb_bus_list_lock);

if (retval == 0) {
} else {
spin_lock_irq (&hcd_root_hub_lock);
hcd->rh_registered = 1;
spin_unlock_irq (&hcd_root_hub_lock);
Expand All @@ -1023,6 +1020,7 @@ static int register_root_hub(struct usb_hcd *hcd)
if (HCD_DEAD(hcd))
usb_hc_died (hcd); /* This time clean up */
}
mutex_unlock(&usb_bus_list_lock);

return retval;
}
Expand Down

0 comments on commit 42ee53d

Please sign in to comment.