lkml.org 
[lkml]   [2016]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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);

\
 
 \ /
  Last update: 2016-09-17 09:57    [W:0.326 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site