From eedc3554fe4b8161c8327efb0d40d095cf55874c Mon Sep 17 00:00:00 2001 From: Jonas Gorski Date: Sun, 10 Feb 2013 12:31:36 +0000 Subject: [PATCH] generic: b53: fix reverted error check in probe MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit b53_switch_detect returns value returned by b53_read8, which is 0 for success. So fail (and return error) only if b53_switch_detect returned something else than 0. This fixes supported and advertising being zeros for MDIO access. Cc: Jonas Gorski Signed-off-by: Rafał Miłecki SVN-Revision: 35534 --- target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c b/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c index 9283af6072aa..1ba05914eadf 100644 --- a/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c +++ b/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c @@ -267,7 +267,7 @@ static int b53_phy_probe(struct phy_device *phydev) mutex_init(&dev.reg_mutex); ret = b53_switch_detect(&dev); - if (!ret) + if (ret) return ret; if (is5325(&dev) || is5365(&dev)) -- 2.30.2