Skip to content

Commit

Permalink
net: wimax: i2400m: control.c: Cleaning up conjunction always evaluat…
Browse files Browse the repository at this point in the history
…es to false

Logical conjunction always evaluates to false:  minor < 2 && minor > 1
I guess what you wanted is rather: minor > 2 || minor < 1

This was partly found using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Rickard Strandqvist authored and David S. Miller committed Jun 11, 2014
1 parent 655aa39 commit f05d435
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wimax/i2400m/control.c
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,7 @@ int i2400m_firmware_check(struct i2400m *i2400m)
goto error_bad_major;
}
result = 0;
if (minor < I2400M_HDIv_MINOR_2 && minor > I2400M_HDIv_MINOR)
if (minor > I2400M_HDIv_MINOR_2 || minor < I2400M_HDIv_MINOR)
dev_warn(dev, "untested minor fw version %u.%u.%u\n",
major, minor, branch);
/* Yes, we ignore the branch -- we don't have to track it */
Expand Down

0 comments on commit f05d435

Please sign in to comment.