Quellcode durchsuchen

USB: ohci-q.c: move assignment out of if () block

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>
Greg Kroah-Hartman vor 10 Jahren
Ursprung
Commit
8af9319198
1 geänderte Dateien mit 2 neuen und 1 gelöschten Zeilen
  1. 2 1
      drivers/usb/host/ohci-q.c

+ 2 - 1
drivers/usb/host/ohci-q.c

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