Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 61933
b: refs/heads/master
c: 195af2c
h: refs/heads/master
i:
  61931: c02b474
v: v3
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed Jul 20, 2007
1 parent 8e1b45e commit 8e4d19e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 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: 69d42a78f935d19384d1f6e4f94b65bb162b36df
refs/heads/master: 195af2cce5ff81c4609c7ba585b6698a7771cbfc
10 changes: 6 additions & 4 deletions trunk/drivers/usb/core/hub.c
Original file line number Diff line number Diff line change
Expand Up @@ -1335,20 +1335,22 @@ int usb_new_device(struct usb_device *udev)
udev->dev.devt = MKDEV(USB_DEVICE_MAJOR,
(((udev->bus->busnum-1) * 128) + (udev->devnum-1)));

/* Increment the parent's count of unsuspended children */
if (udev->parent)
usb_autoresume_device(udev->parent);

/* Register the device. The device driver is responsible
* for adding the device files to sysfs and for configuring
* the device.
*/
err = device_add(&udev->dev);
if (err) {
dev_err(&udev->dev, "can't device_add, error %d\n", err);
if (udev->parent)
usb_autosuspend_device(udev->parent);
goto fail;
}

/* Increment the parent's count of unsuspended children */
if (udev->parent)
usb_autoresume_device(udev->parent);

exit:
return err;

Expand Down

0 comments on commit 8e4d19e

Please sign in to comment.