USB: devio: fix a condition in async_completed()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 18 May 2015 12:29:51 +0000 (15:29 +0300)
committerDanny Wood <danwood76@gmail.com>
Tue, 29 Jan 2019 13:09:18 +0000 (13:09 +0000)
commit 83ed07c5db71bc02bd646d6eb60b48908235cdf9 upstream.

Static checkers complain that the current condition is never true.  It
seems pretty likely that it's a typo and "URB" was intended instead of
"USB".

Fixes: 3d97ff63f899 ('usbdevfs: Use scatter-gather lists for large bulk transfers')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/devio.c

index 0a6db9abc42ec545df27f6a1d91e3ec8a2195842..b5b009461c83392fd2164eed1a061985ee50f807 100644 (file)
@@ -513,7 +513,7 @@ static void async_completed(struct urb *urb)
        snoop(&urb->dev->dev, "urb complete\n");
        snoop_urb(urb->dev, as->userurb, urb->pipe, urb->actual_length,
                        as->status, COMPLETE, NULL, 0);
-       if ((urb->transfer_flags & URB_DIR_MASK) == USB_DIR_IN)
+       if ((urb->transfer_flags & URB_DIR_MASK) == URB_DIR_IN)
                snoop_urb_data(urb, urb->actual_length);
 
        if (as->status < 0 && as->bulk_addr && as->status != -ECONNRESET &&