summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2020-07-27 13:46:42 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-07-29 17:48:02 +0300
commit0ed9498f9ecfde50c93f3f3dd64b4cd5414d9944 (patch)
treeecf464c49106976c06fab3dcbaef6e0f3831f6ce /drivers/usb
parent754498c1d6369d47b6433e9a05ba926255c2d699 (diff)
downloadlinux-0ed9498f9ecfde50c93f3f3dd64b4cd5414d9944.tar.xz
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>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/core/generic.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/usb/core/generic.c b/drivers/usb/core/generic.c
index 4626227a6dd2..b6f2d4b44754 100644
--- a/drivers/usb/core/generic.c
+++ b/drivers/usb/core/generic.c
@@ -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;
}