* [PATCH 1/3] USB: Simplify USB ID table match
@ 2020-07-25 9:13 Bastien Nocera
2020-07-25 14:46 ` Alan Stern
0 siblings, 1 reply; 2+ messages in thread
From: Bastien Nocera @ 2020-07-25 9:13 UTC (permalink / raw)
To: linux-usb; +Cc: Greg Kroah-Hartman, Alan Stern
usb_device_match_id() supports being passed NULL tables, so no need to
check for it.
Signed-off-by: Bastien Nocera <hadess@hadess.net>
---
drivers/usb/core/generic.c | 2 --
1 file changed, 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;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/3] USB: Simplify USB ID table match
2020-07-25 9:13 [PATCH 1/3] USB: Simplify USB ID table match Bastien Nocera
@ 2020-07-25 14:46 ` Alan Stern
0 siblings, 0 replies; 2+ messages in thread
From: Alan Stern @ 2020-07-25 14:46 UTC (permalink / raw)
To: Bastien Nocera; +Cc: linux-usb, Greg Kroah-Hartman
On Sat, Jul 25, 2020 at 11:13:12AM +0200, Bastien Nocera wrote:
> usb_device_match_id() supports being passed NULL tables, so no need to
> check for it.
>
> Signed-off-by: Bastien Nocera <hadess@hadess.net>
> ---
> drivers/usb/core/generic.c | 2 --
> 1 file changed, 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;
> }
Acked-by: Alan Stern <stern@rowland.harvard.edu>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-25 14:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-25 9:13 [PATCH 1/3] USB: Simplify USB ID table match Bastien Nocera
2020-07-25 14:46 ` Alan Stern
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).