From: Mathieu Laurendeau <mathieu@laurendeau.net>
To: linux-usb@vger.kernel.org
Cc: Felipe Balbi <balbi@kernel.org>, stable@vger.kernel.org
Subject: [PATCH] usb/gadget: fix gadgetfs aio support
Date: Fri, 8 Jul 2016 08:15:10 +0200 [thread overview]
Message-ID: <577F44EE.20504@laurendeau.net> (raw)
Hi,
Since commit 7fe3976e0f3ab26f8ffd9430d3d2a19a70f2c8d2 ("gadget: switch
ep_io_operations to ->read_iter/->write_iter") io submissions fail with
ENODEV.
Fixes: 7fe3976e0f3a ("gadget: switch ep_io_operations to
->read_iter/->write_iter")
Signed-off-by: Mathieu Laurendeau <mat.lau@laposte.net>
---
drivers/usb/gadget/legacy/inode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/legacy/inode.c b/drivers/usb/gadget/legacy/inode.c
index aa3707b..120a03a 100644
--- a/drivers/usb/gadget/legacy/inode.c
+++ b/drivers/usb/gadget/legacy/inode.c
@@ -542,7 +542,7 @@ static ssize_t ep_aio(struct kiocb *iocb,
*/
spin_lock_irq(&epdata->dev->lock);
value = -ENODEV;
- if (unlikely(epdata->ep))
+ if (unlikely(epdata->ep) == NULL)
goto fail;
req = usb_ep_alloc_request(epdata->ep, GFP_ATOMIC);
--
1.9.1
next reply other threads:[~2016-07-08 7:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-08 6:15 Mathieu Laurendeau [this message]
2016-07-08 9:24 ` [PATCH] usb/gadget: fix gadgetfs aio support kbuild test robot
2016-07-08 9:34 ` kbuild test robot
2016-07-08 10:00 ` kbuild test robot
2016-07-08 11:01 ` Sergei Shtylyov
2016-07-08 11:28 ` Mathieu Laurendeau
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=577F44EE.20504@laurendeau.net \
--to=mathieu@laurendeau.net \
--cc=balbi@kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stable@vger.kernel.org \
/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