提交 d0d6bc89 编写于 作者: G Greg Kroah-Hartman

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: NAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: NFelipe Balbi <balbi@ti.com>
上级 4c08ccf0
...@@ -491,7 +491,8 @@ static ssize_t fill_periodic_buffer(struct debug_buffer *buf) ...@@ -491,7 +491,8 @@ static ssize_t fill_periodic_buffer(struct debug_buffer *buf)
char *next; char *next;
unsigned i; unsigned i;
if (!(seen = kmalloc (DBG_SCHED_LIMIT * sizeof *seen, GFP_ATOMIC))) seen = kmalloc(DBG_SCHED_LIMIT * sizeof *seen, GFP_ATOMIC);
if (!seen)
return 0; return 0;
seen_count = 0; seen_count = 0;
...@@ -506,7 +507,8 @@ static ssize_t fill_periodic_buffer(struct debug_buffer *buf) ...@@ -506,7 +507,8 @@ static ssize_t fill_periodic_buffer(struct debug_buffer *buf)
/* dump a snapshot of the periodic schedule (and load) */ /* dump a snapshot of the periodic schedule (and load) */
spin_lock_irqsave (&ohci->lock, flags); spin_lock_irqsave (&ohci->lock, flags);
for (i = 0; i < NUM_INTS; i++) { for (i = 0; i < NUM_INTS; i++) {
if (!(ed = ohci->periodic [i])) ed = ohci->periodic[i];
if (!ed)
continue; continue;
temp = scnprintf (next, size, "%2d [%3d]:", i, ohci->load [i]); temp = scnprintf (next, size, "%2d [%3d]:", i, ohci->load [i]);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册