Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1466387 > unrolled thread

Re: [PATCH 1/2] net: phy: Add error checks in the driver

Started byAndrew Lunn <andrew@lunn.ch>
First post2016-08-19 15:20 +0200
Last post2016-08-19 15:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 1/2] net: phy: Add error checks in the driver Andrew Lunn <andrew@lunn.ch> - 2016-08-19 15:20 +0200

#1466387 — Re: [PATCH 1/2] net: phy: Add error checks in the driver

FromAndrew Lunn <andrew@lunn.ch>
Date2016-08-19 15:20 +0200
SubjectRe: [PATCH 1/2] net: phy: Add error checks in the driver
Message-ID<s7RSh-65h-9@gated-at.bofh.it>
> -	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);

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web