From: Duncan Sands <baldrick@free.fr>
To: Greg KH <greg@kroah.com>
Cc: linux-usb-devel@lists.sf.net, linux-kernel@vger.kernel.org,
Frederic Detienne <fd@cisco.com>
Subject: [PATCH 9/9] USB usbfs: drop pointless racy check
Date: Wed, 14 Apr 2004 12:51:28 +0200 [thread overview]
Message-ID: <200404141251.28610.baldrick@free.fr> (raw)
The check of interface->dev.driver requires a lock to be taken
to protect against driver binding changes. But in fact I think it
is better just to drop the test. The result is that the caller is
required to claim an interface before changing the altsetting,
which is consistent with the other routines that operate on
interfaces.
devio.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff -Nru a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
--- a/drivers/usb/core/devio.c Wed Apr 14 12:18:37 2004
+++ b/drivers/usb/core/devio.c Wed Apr 14 12:18:37 2004
@@ -747,10 +747,8 @@
if ((ret = findintfif(ps->dev, setintf.interface)) < 0)
return ret;
interface = ps->dev->actconfig->interface[ret];
- if (interface->dev.driver) {
- if ((ret = checkintf(ps, ret)))
- return ret;
- }
+ if ((ret = checkintf(ps, ret)))
+ return ret;
if (usb_set_interface(ps->dev, setintf.interface, setintf.altsetting))
return -EINVAL;
return 0;
reply other threads:[~2004-04-14 10:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200404141251.28610.baldrick@free.fr \
--to=baldrick@free.fr \
--cc=fd@cisco.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sf.net \
/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
all inboxes | Powered by JetHome®