Commit 8fd5243e authored by Mathieu Laurendeau's avatar Mathieu Laurendeau Committed by Greg Kroah-Hartman

usb/gadget: fix gadgetfs aio support.

commit 327b21da upstream.

Fix io submissions failing with ENODEV.
Signed-off-by: default avatarMathieu Laurendeau <mat.lau@laposte.net>
Fixes: 7fe3976e ("gadget: switch ep_io_operations to ->read_iter/->write_iter")
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e9caf24c
......@@ -541,7 +541,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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment