Skip to contentSkip to conversation

net: phy-micrel: check return code in flp center function

PATCH Applied Max Uvarov 2 participants 2 messages Nov 30, 2017 – Dec 1, 2017

Subsystems (3)
lore
Share & tools
lore

Max Uvarov

author
#0 lore raw

PATCH 1/1 net: phy-micrel: check return code in flp center function

Fix obvious typo that first return value is set but not checked.

---
 drivers/net/phy/micrel.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/net/phy/micrel.c +4 -2
index fdb43dd..ab46141 100644
@@ -496,16 +496,18 @@ static int ksz9031_of_load_skew_values(struct phy_device *phydev,
 	return ksz9031_extended_write(phydev, OP_DATA, 2, reg, newval);
 }
 
+/* Center KSZ9031RNX FLP timing at 16ms. */
 static int ksz9031_center_flp_timing(struct phy_device *phydev)
 {
 	int result;
 
-	/* Center KSZ9031RNX FLP timing at 16ms. */
 	result = ksz9031_extended_write(phydev, OP_DATA, 0,
 					MII_KSZ9031RN_FLP_BURST_TX_HI, 0x0006);
+	if (result)
+		return result;
+
 	result = ksz9031_extended_write(phydev, OP_DATA, 0,
 					MII_KSZ9031RN_FLP_BURST_TX_LO, 0x1A80);
-
 	if (result)
 		return result;
 
Signature · 1 line
2.5.0