From: Bastien Nocera <hadess@hadess.net>
To: linux-usb@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Alan Stern <stern@rowland.harvard.edu>,
Bastien Nocera <hadess@hadess.net>
Subject: [PATCH v6 1/3] USB: Simplify USB ID table match
Date: Mon, 27 Jul 2020 12:46:42 +0200 [thread overview]
Message-ID: <20200727104644.149873-1-hadess@hadess.net> (raw)
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
next reply other threads:[~2020-07-27 10:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-27 10:46 Bastien Nocera [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200727104644.149873-1-hadess@hadess.net \
--to=hadess@hadess.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox