[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160819131517.GB7343@lunn.ch>
Date: Fri, 19 Aug 2016 15:15:17 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Kedareswara rao Appana <appana.durga.rao@...inx.com>
Cc: michal.simek@...inx.com, soren.brinkmann@...inx.com,
appanad@...inx.com, f.fainelli@...il.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org
Subject: Re: [PATCH 1/2] net: phy: Add error checks in the driver
> - mdiobus_write(phydev->mdio.bus, priv->addr, XILINX_GMII2RGMII_REG, val);
> + err = mdiobus_write(phydev->mdio.bus, priv->addr, XILINX_GMII2RGMII_REG,
> + val);
> + if (err < 0)
> + return err;
>
> return 0;
Do you need to assign err? Why not just
return mdiobus_write(phydev->mdio.bus, priv->addr, XILINX_GMII2RGMII_REG,
val);
Powered by blists - more mailing lists