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:
Bastien Nocera 2020-07-27 12:46:42 +02:00 committed by Greg Kroah-Hartman
parent 754498c1d6
commit 0ed9498f9e
1 changed files with 0 additions and 2 deletions

View File

@ -205,8 +205,6 @@ static int __check_usb_generic(struct device_driver *drv, void *data)
udrv = to_usb_device_driver(drv);
if (udrv == &usb_generic_driver)
return 0;
if (!udrv->id_table)
return 0;
return usb_device_match_id(udev, udrv->id_table) != NULL;
}