All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb/gadget: fix gadgetfs aio support
@ 2016-07-08  6:15 Mathieu Laurendeau
  2016-07-08  9:24 ` kbuild test robot
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Mathieu Laurendeau @ 2016-07-08  6:15 UTC (permalink / raw)
  To: linux-usb; +Cc: Felipe Balbi, stable

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

^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [PATCH] usb/gadget: fix gadgetfs aio support.
@ 2016-07-15 12:58 Mathieu Laurendeau
  0 siblings, 0 replies; 7+ messages in thread
From: Mathieu Laurendeau @ 2016-07-15 12:58 UTC (permalink / raw)
  To: balbi; +Cc: gregkh, linux-usb, linux-kernel, stable

Fix io submissions failing with ENODEV.

Signed-off-by: Mathieu Laurendeau <mat.lau@laposte.net>
Fixes: 7fe3976e0f3a ("gadget: switch ep_io_operations to ->read_iter/->write_iter")
---
 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..be64798 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);
-- 
2.7.4

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

end of thread, other threads:[~2016-07-15 13:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-08  6:15 [PATCH] usb/gadget: fix gadgetfs aio support Mathieu Laurendeau
2016-07-08  9:24 ` 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
2016-07-15 12:58 Mathieu Laurendeau

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.