summaryrefslogtreecommitdiff
path: root/drivers/net/phy/micrel.c
diff options
context:
space:
mode:
authorMax Uvarov <muvarov@gmail.com>2017-11-30 13:08:29 +0300
committerDavid S. Miller <davem@davemloft.net>2017-12-01 23:17:06 +0300
commita0da456bbf95d2a9294799bb05c61bfb24736bb7 (patch)
treeee3e72a9aff88b0666801dc1b0bfd5ecbe14a20c /drivers/net/phy/micrel.c
parentc7799c067c2ae33e348508c8afec354f3257ff25 (diff)
downloadlinux-a0da456bbf95d2a9294799bb05c61bfb24736bb7.tar.xz
net: phy-micrel: check return code in flp center function
Fix obvious typo that first return value is set but not checked. Signed-off-by: Max Uvarov <muvarov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/micrel.c')
-rw-r--r--drivers/net/phy/micrel.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index fdb43dd9b5cd..ab4614113403 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -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;