summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2016-06-01 21:58:33 -0700
committerSascha Hauer <s.hauer@pengutronix.de>2016-06-03 09:14:14 +0200
commita199e7b2210206e3ab53df537614baf524b22343 (patch)
tree271cb88e4de792c16f8692bffcb6c728caa17550 /drivers/net
parent940bd8bb25e037a31ba1cf26d8535bdb24c3723e (diff)
downloadbarebox-a199e7b2210206e3ab53df537614baf524b22343.tar.gz
barebox-a199e7b2210206e3ab53df537614baf524b22343.tar.xz
e1000: Fix a bug in e1000_detect_gig_phy
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@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/e1000/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/e1000/main.c b/drivers/net/e1000/main.c
index f3c0ed821b..978e525aa5 100644
--- a/drivers/net/e1000/main.c
+++ b/drivers/net/e1000/main.c
@@ -3096,7 +3096,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;
}