]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/usb/core/driver.c
usb: hub: Do not attempt to autosuspend disconnected devices
[karo-tx-linux.git] / drivers / usb / core / driver.c
index 7ebdf2a4e8fe9e65e02a9eb1f244f847cc17bd33..eb87a259d55c3abcc4d54e929cba861a0b429fae 100644 (file)
@@ -1781,6 +1781,9 @@ static int autosuspend_check(struct usb_device *udev)
        int                     w, i;
        struct usb_interface    *intf;
 
+       if (udev->state == USB_STATE_NOTATTACHED)
+               return -ENODEV;
+
        /* Fail if autosuspend is disabled, or any interfaces are in use, or
         * any interface drivers require remote wakeup but it isn't available.
         */