diff options
author | Inaky Perez-Gonzalez <inaky@linux.intel.com> | 2007-08-01 05:34:03 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-10-12 23:55:07 +0200 |
commit | 72230abb21349cda54d6cce0d6fd325c023b958e (patch) | |
tree | f3a6bfa3026d6c0f659343c40f81a6c46714ff52 /drivers/usb/core | |
parent | usb: usb_get_configuration() obeys authorization (diff) | |
download | linux-72230abb21349cda54d6cce0d6fd325c023b958e.tar.xz linux-72230abb21349cda54d6cce0d6fd325c023b958e.zip |
usb: usb_probe_interface() obeys authorization
If called and the device is not authorized to be used, it won't
configure the interface and print a message saying so.
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core')
-rw-r--r-- | drivers/usb/core/driver.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c index 63b1243a9139..8da4801bb922 100644 --- a/drivers/usb/core/driver.c +++ b/drivers/usb/core/driver.c @@ -202,6 +202,11 @@ static int usb_probe_interface(struct device *dev) intf = to_usb_interface(dev); udev = interface_to_usbdev(intf); + if (udev->authorized == 0) { + dev_err(&intf->dev, "Device is not authorized for usage\n"); + return -ENODEV; + } + id = usb_match_id(intf, driver->id_table); if (!id) id = usb_match_dynamic_id(intf, driver); |