mirror of https://gitee.com/openkylin/linux.git
USB: Simplify USB ID table match
usb_device_match_id() supports being passed NULL tables, so no need to check for it. Signed-off-by: Bastien Nocera <hadess@hadess.net> Link: https://lore.kernel.org/r/20200727104644.149873-1-hadess@hadess.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
754498c1d6
commit
0ed9498f9e
|
@ -205,8 +205,6 @@ static int __check_usb_generic(struct device_driver *drv, void *data)
|
||||||
udrv = to_usb_device_driver(drv);
|
udrv = to_usb_device_driver(drv);
|
||||||
if (udrv == &usb_generic_driver)
|
if (udrv == &usb_generic_driver)
|
||||||
return 0;
|
return 0;
|
||||||
if (!udrv->id_table)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
return usb_device_match_id(udev, udrv->id_table) != NULL;
|
return usb_device_match_id(udev, udrv->id_table) != NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue