• Kris Borer's avatar
    usb: move assignment out of if condition · 0faaad46
    Kris Borer authored
    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: default avatarKris Borer <kborer@gmail.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    0faaad46
hcd.c 84.5 KB