Thread (5 messages) flat view 5 messages, 2 authors, 2016-08-19

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

From: Andrew Lunn <andrew@lunn.ch>
Date: 2016-08-19 13:15:26
Also in: linux-arm-kernel, lkml

-	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);
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help