]> git.karo-electronics.de Git - linux-beck.git/commitdiff
USB: ohci-hcd.c: move assignment out of if () block
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Apr 2015 09:33:00 +0000 (11:33 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 10 May 2015 14:01:11 +0000 (16:01 +0200)
We should not be doing assignments within an if () block
so fix up the code to not do this.

change was created using Coccinelle.

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Felipe Balbi <balbi@ti.com>
drivers/usb/host/ohci-hcd.c

index 1dab9dfbca6a16d03efce398d2280016eb101b5f..760cb57e954efeb8977c3a8e55c9351390e3b67a 100644 (file)
@@ -155,7 +155,8 @@ static int ohci_urb_enqueue (
        int             retval = 0;
 
        /* every endpoint has a ed, locate and maybe (re)initialize it */
-       if (! (ed = ed_get (ohci, urb->ep, urb->dev, pipe, urb->interval)))
+       ed = ed_get(ohci, urb->ep, urb->dev, pipe, urb->interval);
+       if (! ed)
                return -ENOMEM;
 
        /* for the private part of the URB we need the number of TDs (size) */