提交 f05d435b 编写于 作者: R Rickard Strandqvist 提交者: David S. Miller

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: NRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 655aa393
...@@ -1061,7 +1061,7 @@ int i2400m_firmware_check(struct i2400m *i2400m) ...@@ -1061,7 +1061,7 @@ int i2400m_firmware_check(struct i2400m *i2400m)
goto error_bad_major; goto error_bad_major;
} }
result = 0; 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", dev_warn(dev, "untested minor fw version %u.%u.%u\n",
major, minor, branch); major, minor, branch);
/* Yes, we ignore the branch -- we don't have to track it */ /* Yes, we ignore the branch -- we don't have to track it */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册