]> git.karo-electronics.de Git - linux-beck.git/commit
usb: move assignment out of if condition
authorKris Borer <kborer@gmail.com>
Tue, 14 Jul 2015 13:28:30 +0000 (09:28 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Jul 2015 22:42:13 +0000 (15:42 -0700)
commit0faaad461547e2412e9b519cd757a99b3ebc1302
tree296f051d15ea4971690e9c6a6cd62260168efbe8
parentc2a298d96628803586f1ca2027b6387f4e4b5a31
usb: move assignment out of if condition

Fix four occurrences of checkpatch.pl error:

ERROR: do not use assignment in if condition

The semantic patch that makes this change is:

// <smpl>
@@
identifier i;
expression E;
statement S;
constant c;
binary operator b;
@@

+ i = E;
  if (
- (i = E)
+ i
  b
  c ) S

@@
identifier i, i2;
expression E1, E2;
constant c;
@@

+ if( E1->i ) {
+   i2 = E2;
+  if (i2 < c) {
- if( E1->i && (i2 = E2) < c ) {
  ...
- }
+  }
+ }
// </smpl>

Signed-off-by: Kris Borer <kborer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/hcd.c