Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Bastien Nocera and committed by
Greg Kroah-Hartman
0ed9498f 754498c1

-2
-2
drivers/usb/core/generic.c
··· 205 205 udrv = to_usb_device_driver(drv); 206 206 if (udrv == &usb_generic_driver) 207 207 return 0; 208 - if (!udrv->id_table) 209 - return 0; 210 208 211 209 return usb_device_match_id(udev, udrv->id_table) != NULL; 212 210 }