[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e3d3b931-0d0d-af39-8b79-001ceb6942cf@gmail.com>
Date: Wed, 26 Dec 2018 19:09:21 +0100
From: Heiner Kallweit <hkallweit1@...il.com>
To: Kangjie Lu <kjlu@....edu>
Cc: pakki001@....edu, Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] net: dsa: bcm_sf2: Propagate error value from
mdio_write
On 26.12.2018 18:50, Kangjie Lu wrote:
> 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@....edu>
> ---
> drivers/net/dsa/bcm_sf2.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c
> index 2eb68769562c..73fbc16a1f86 100644
> --- a/drivers/net/dsa/bcm_sf2.c
> +++ b/drivers/net/dsa/bcm_sf2.c
> @@ -305,9 +305,8 @@ static int bcm_sf2_sw_mdio_write(struct mii_bus *bus, int addr, int regnum,
> if (addr == BRCM_PSEUDO_PHY_ADDR && priv->indir_phy_mask & BIT(addr))
> 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);
> }
Did you try to compile this? The first branch of the if clause has no return
value any longer.
Powered by blists - more mailing lists