]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - drivers/usb/core/hub.c
usb: hub: Fix crash after failure to read BOS descriptor
[mirror_ubuntu-zesty-kernel.git] / drivers / usb / core / hub.c
index a56c75e09786d5fa1e064a8e56e58e4095e4d716..48fbf523d186e21802ad21a1590ab2e4a9fb7f87 100644 (file)
@@ -4275,7 +4275,7 @@ static void hub_set_initial_usb2_lpm_policy(struct usb_device *udev)
        struct usb_hub *hub = usb_hub_to_struct_hub(udev->parent);
        int connect_type = USB_PORT_CONNECT_TYPE_UNKNOWN;
 
-       if (!udev->usb2_hw_lpm_capable)
+       if (!udev->usb2_hw_lpm_capable || !udev->bos)
                return;
 
        if (hub)