From: Rickard Strandqvist Date: Sat, 7 Jun 2014 11:26:37 +0000 (+0200) Subject: net: wimax: i2400m: control.c: Cleaning up conjunction always evaluates to false X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f05d435bde588ac26ba75f7f6893b2a63ae71381;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git net: wimax: i2400m: control.c: Cleaning up conjunction always evaluates 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/wimax/i2400m/control.c b/drivers/net/wimax/i2400m/control.c index 4a01e5c7fe09..4c417903e9be 100644 --- a/drivers/net/wimax/i2400m/control.c +++ b/drivers/net/wimax/i2400m/control.c @@ -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 */