Skip to content

Commit

Permalink
usb: hub: remove assignment from if condition
Browse files Browse the repository at this point in the history
Fix one occurrence of the checkpatch.pl error:

ERROR: do not use assignment in if condition

The semantic patch that makes this change is:

// <smpl>
@@
identifier i;
expression E, E2, E3;
statement S1, S2;
binary operator b;
@@

+ i = E;
  if (
- (i = E)
+ i
  b
  ... && E2 && E3 ) S1 else S2
// </smpl>

Signed-off-by: Kris Borer <kborer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Kris Borer authored and Greg Kroah-Hartman committed Aug 14, 2015
1 parent e3ec4fd commit 088a3da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/core/hub.c
Original file line number Diff line number Diff line change
Expand Up @@ -671,8 +671,8 @@ static void hub_irq(struct urb *urb)
if (hub->quiescing)
return;

if ((status = usb_submit_urb(hub->urb, GFP_ATOMIC)) != 0
&& status != -ENODEV && status != -EPERM)
status = usb_submit_urb(hub->urb, GFP_ATOMIC);
if (status != 0 && status != -ENODEV && status != -EPERM)
dev_err(hub->intfdev, "resubmit --> %d\n", status);
}

Expand Down

0 comments on commit 088a3da

Please sign in to comment.