diff options
Diffstat (limited to 'drivers/usb/core/config.c')
-rw-r--r-- | drivers/usb/core/config.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c index a6b2cabe7930..8d72f0c65937 100644 --- a/drivers/usb/core/config.c +++ b/drivers/usb/core/config.c | |||
@@ -3,7 +3,6 @@ | |||
3 | #include <linux/usb/hcd.h> | 3 | #include <linux/usb/hcd.h> |
4 | #include <linux/usb/quirks.h> | 4 | #include <linux/usb/quirks.h> |
5 | #include <linux/module.h> | 5 | #include <linux/module.h> |
6 | #include <linux/init.h> | ||
7 | #include <linux/slab.h> | 6 | #include <linux/slab.h> |
8 | #include <linux/device.h> | 7 | #include <linux/device.h> |
9 | #include <asm/byteorder.h> | 8 | #include <asm/byteorder.h> |
@@ -651,10 +650,6 @@ void usb_destroy_configuration(struct usb_device *dev) | |||
651 | * | 650 | * |
652 | * hub-only!! ... and only in reset path, or usb_new_device() | 651 | * hub-only!! ... and only in reset path, or usb_new_device() |
653 | * (used by real hubs and virtual root hubs) | 652 | * (used by real hubs and virtual root hubs) |
654 | * | ||
655 | * NOTE: if this is a WUSB device and is not authorized, we skip the | ||
656 | * whole thing. A non-authorized USB device has no | ||
657 | * configurations. | ||
658 | */ | 653 | */ |
659 | int usb_get_configuration(struct usb_device *dev) | 654 | int usb_get_configuration(struct usb_device *dev) |
660 | { | 655 | { |
@@ -666,8 +661,6 @@ int usb_get_configuration(struct usb_device *dev) | |||
666 | struct usb_config_descriptor *desc; | 661 | struct usb_config_descriptor *desc; |
667 | 662 | ||
668 | cfgno = 0; | 663 | cfgno = 0; |
669 | if (dev->authorized == 0) /* Not really an error */ | ||
670 | goto out_not_authorized; | ||
671 | result = -ENOMEM; | 664 | result = -ENOMEM; |
672 | if (ncfg > USB_MAXCONFIG) { | 665 | if (ncfg > USB_MAXCONFIG) { |
673 | dev_warn(ddev, "too many configurations: %d, " | 666 | dev_warn(ddev, "too many configurations: %d, " |
@@ -751,7 +744,6 @@ int usb_get_configuration(struct usb_device *dev) | |||
751 | 744 | ||
752 | err: | 745 | err: |
753 | kfree(desc); | 746 | kfree(desc); |
754 | out_not_authorized: | ||
755 | dev->descriptor.bNumConfigurations = cfgno; | 747 | dev->descriptor.bNumConfigurations = cfgno; |
756 | err2: | 748 | err2: |
757 | if (result == -ENOMEM) | 749 | if (result == -ENOMEM) |