linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v6 1/3] USB: Simplify USB ID table match
@ 2020-07-27 10:46 Bastien Nocera
  2020-07-27 10:46 ` [PATCH v6 2/3] USB: Also check for ->match Bastien Nocera
  2020-07-27 10:46 ` [PATCH v6 3/3] USB: Fix device driver race Bastien Nocera
  0 siblings, 2 replies; 8+ messages in thread
From: Bastien Nocera @ 2020-07-27 10:46 UTC (permalink / raw)
  To: linux-usb; +Cc: Greg Kroah-Hartman, Alan Stern, Bastien Nocera

usb_device_match_id() supports being passed NULL tables, so no need to
check for it.

Signed-off-by: Bastien Nocera <hadess@hadess.net>
---
- No changes since previous version

 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;
 }
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-08-04 11:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-27 10:46 [PATCH v6 1/3] USB: Simplify USB ID table match Bastien Nocera
2020-07-27 10:46 ` [PATCH v6 2/3] USB: Also check for ->match Bastien Nocera
2020-07-27 10:46 ` [PATCH v6 3/3] USB: Fix device driver race Bastien Nocera
2020-08-03 15:04   ` Bastien Nocera
2020-08-03 15:38     ` Greg Kroah-Hartman
2020-08-04 11:41       ` Bastien Nocera
2020-08-04 11:56         ` Greg Kroah-Hartman
2020-08-03 16:02     ` 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).