Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

USB: ohci-dbg.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>

+4 -2
+4 -2
drivers/usb/host/ohci-dbg.c
··· 491 491 char *next; 492 492 unsigned i; 493 493 494 - if (!(seen = kmalloc (DBG_SCHED_LIMIT * sizeof *seen, GFP_ATOMIC))) 494 + seen = kmalloc(DBG_SCHED_LIMIT * sizeof *seen, GFP_ATOMIC); 495 + if (!seen) 495 496 return 0; 496 497 seen_count = 0; 497 498 ··· 507 506 /* dump a snapshot of the periodic schedule (and load) */ 508 507 spin_lock_irqsave (&ohci->lock, flags); 509 508 for (i = 0; i < NUM_INTS; i++) { 510 - if (!(ed = ohci->periodic [i])) 509 + ed = ohci->periodic[i]; 510 + if (!ed) 511 511 continue; 512 512 513 513 temp = scnprintf (next, size, "%2d [%3d]:", i, ohci->load [i]);