diff options
author | Mathieu Laurendeau <mat.lau@laposte.net> | 2016-07-15 12:58:41 (GMT) |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-08-11 12:09:47 (GMT) |
commit | 327b21da884fe1a29f733e41792ddd53e4a30379 (patch) | |
tree | 6b0881ed1980d8405534dfedc5f0858211945fb0 /drivers/usb | |
parent | 3887db5c2b6531c59e9649a4293071b575d6eb3b (diff) | |
download | linux-327b21da884fe1a29f733e41792ddd53e4a30379.tar.xz |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/legacy/inode.c b/drivers/usb/gadget/legacy/inode.c index 8560f2f..16104b5e 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); |