aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorJonas Gorski <jogo@openwrt.org>2013-02-10 12:31:36 +0000
committerJonas Gorski <jogo@openwrt.org>2013-02-10 12:31:36 +0000
commitc5bae90408719c42aeff0af57ef5c6fb07658e16 (patch)
tree549579c37c300af409ec81ac222d377ab8881d5f /target/linux
parent3d89abe3bfee098fec6706a0a5b0f54305ee2dc0 (diff)
downloadupstream-c5bae90408719c42aeff0af57ef5c6fb07658e16.tar.gz
upstream-c5bae90408719c42aeff0af57ef5c6fb07658e16.tar.bz2
upstream-c5bae90408719c42aeff0af57ef5c6fb07658e16.zip
generic: b53: fix reverted error check in probe
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 <jogo@openwrt.org> Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35534 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c2
1 files changed, 1 insertions, 1 deletions
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 9283af6072..1ba05914ea 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))