From inaky@linux.intel.com Tue Jul 31 20:34:52 2007 From: Inaky Perez-Gonzalez Date: Tue, 31 Jul 2007 20:34:03 -0700 Subject: [patch 07/18] usb: usb_probe_interface() obeys authorization To: greg@kroah.com Message-ID: <20070801033438.958878562@linux.intel.com>> 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 Signed-off-by: Greg Kroah-Hartman --- drivers/usb/core/driver.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/drivers/usb/core/driver.c +++ b/drivers/usb/core/driver.c @@ -201,6 +201,11 @@ static int usb_probe_interface(struct de 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)