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>

SVN-Revision: 35534
lede-17.01
Jonas Gorski 2013-02-10 12:31:36 +00:00
parent 200359a520
commit eedc3554fe
1 changed files with 1 additions and 1 deletions

View File

@ -267,7 +267,7 @@ static int b53_phy_probe(struct phy_device *phydev)
mutex_init(&dev.reg_mutex); mutex_init(&dev.reg_mutex);
ret = b53_switch_detect(&dev); ret = b53_switch_detect(&dev);
if (!ret) if (ret)
return ret; return ret;
if (is5325(&dev) || is5365(&dev)) if (is5325(&dev) || is5365(&dev))