diff options
author | Kangjie Lu <kjlu@umn.edu> | 2018-12-26 07:08:18 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-12-28 03:22:13 +0300 |
commit | e49505f7255be8ced695919c08a29bf2c3d79616 (patch) | |
tree | 3a8cc6f0fb1363838948da2282451bda1e7be77b /drivers | |
parent | f86a3b83833e7cfe558ca4d70b64ebc48903efec (diff) | |
download | linux-e49505f7255be8ced695919c08a29bf2c3d79616.tar.xz |
net: dsa: bcm_sf2: Propagate error value from mdio_write
Both bcm_sf2_sw_indir_rw and mdiobus_write_nested could fail, so let's
return their error codes upstream.
Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/dsa/bcm_sf2.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c index aa4a1f5206f1..361fbde76654 100644 --- a/drivers/net/dsa/bcm_sf2.c +++ b/drivers/net/dsa/bcm_sf2.c @@ -303,11 +303,10 @@ static int bcm_sf2_sw_mdio_write(struct mii_bus *bus, int addr, int regnum, * send them to our master MDIO bus controller */ if (addr == BRCM_PSEUDO_PHY_ADDR && priv->indir_phy_mask & BIT(addr)) - bcm_sf2_sw_indir_rw(priv, 0, addr, regnum, val); + return bcm_sf2_sw_indir_rw(priv, 0, addr, regnum, val); else - mdiobus_write_nested(priv->master_mii_bus, addr, regnum, val); - - return 0; + return mdiobus_write_nested(priv->master_mii_bus, addr, + regnum, val); } static irqreturn_t bcm_sf2_switch_0_isr(int irq, void *dev_id) |