mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-02 05:46:47 +07:00
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>
This commit is contained in:
parent
1145065cd0
commit
72230abb21
@ -202,6 +202,11 @@ static int usb_probe_interface(struct device *dev)
|
|||||||
intf = to_usb_interface(dev);
|
intf = to_usb_interface(dev);
|
||||||
udev = interface_to_usbdev(intf);
|
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);
|
id = usb_match_id(intf, driver->id_table);
|
||||||
if (!id)
|
if (!id)
|
||||||
id = usb_match_dynamic_id(intf, driver);
|
id = usb_match_dynamic_id(intf, driver);
|
||||||
|
Loading…
Reference in New Issue
Block a user