]> git.karo-electronics.de Git - linux-beck.git/commitdiff
USB: ohci-q.c: move assignment out of if () block
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Apr 2015 09:33:01 +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-q.c

index 1463c398d32204cb063e1b8c72a4a57246b30b48..f7d561ed3c236290aa90334b90bd52cbfa9f7632 100644 (file)
@@ -407,7 +407,8 @@ static struct ed *ed_get (
 
        spin_lock_irqsave (&ohci->lock, flags);
 
-       if (!(ed = ep->hcpriv)) {
+       ed = ep->hcpriv;
+       if (!ed) {
                struct td       *td;
                int             is_out;
                u32             info;