aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorMathieu Laurendeau <mat.lau@laposte.net>2016-07-15 08:58:41 -0400
committerFelipe Balbi <felipe.balbi@linux.intel.com>2016-08-11 08:09:47 -0400
commit327b21da884fe1a29f733e41792ddd53e4a30379 (patch)
tree6b0881ed1980d8405534dfedc5f0858211945fb0 /drivers/usb
parent3887db5c2b6531c59e9649a4293071b575d6eb3b (diff)
usb/gadget: fix gadgetfs aio support.
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") Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/legacy/inode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/legacy/inode.c b/drivers/usb/gadget/legacy/inode.c
index 8560f2fe3af5..16104b5ebdcb 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,
542 */ 542 */
543 spin_lock_irq(&epdata->dev->lock); 543 spin_lock_irq(&epdata->dev->lock);
544 value = -ENODEV; 544 value = -ENODEV;
545 if (unlikely(epdata->ep)) 545 if (unlikely(epdata->ep == NULL))
546 goto fail; 546 goto fail;
547 547
548 req = usb_ep_alloc_request(epdata->ep, GFP_ATOMIC); 548 req = usb_ep_alloc_request(epdata->ep, GFP_ATOMIC);