Browse Source

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>
Mathieu Laurendeau 9 years ago
parent
commit
327b21da88
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/usb/gadget/legacy/inode.c

+ 1 - 1
drivers/usb/gadget/legacy/inode.c

@@ -542,7 +542,7 @@ static ssize_t ep_aio(struct kiocb *iocb,
 	 */
 	 */
 	spin_lock_irq(&epdata->dev->lock);
 	spin_lock_irq(&epdata->dev->lock);
 	value = -ENODEV;
 	value = -ENODEV;
-	if (unlikely(epdata->ep))
+	if (unlikely(epdata->ep == NULL))
 		goto fail;
 		goto fail;
 
 
 	req = usb_ep_alloc_request(epdata->ep, GFP_ATOMIC);
 	req = usb_ep_alloc_request(epdata->ep, GFP_ATOMIC);