[PATCH 02/20] e1000: Fix a bug in e1000_detect_gig_phy
Andrey Smirnov
andrew.smirnov at gmail.com
Sun Jan 17 19:52:23 PST 2016
It seems there's stray exclamation mark character in
e1000_detect_gig_phy which renders the whole if statement useless
since it converts 'phy_type' into a boolean and comparing that to 0xFF
would always result in false (which GCC 5.1 is now able to detect and
warn about). This commit fixes that.
Signed-off-by: Andrey Smirnov <andrew.smirnov at gmail.com>
---
drivers/net/e1000/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/e1000/main.c b/drivers/net/e1000/main.c
index 552b0dc..05c3a78 100644
--- a/drivers/net/e1000/main.c
+++ b/drivers/net/e1000/main.c
@@ -3097,7 +3097,7 @@ static int32_t e1000_detect_gig_phy(struct e1000_hw *hw)
return -E1000_ERR_CONFIG;
}
- if (!phy_type == e1000_phy_undefined) {
+ if (phy_type == e1000_phy_undefined) {
dev_dbg(hw->dev, "Invalid PHY ID 0x%X\n", hw->phy_id);
return -EINVAL;
}
--
2.5.0
More information about the barebox
mailing list