summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKangjie Lu <kjlu@umn.edu>2018-12-25 22:23:19 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-05 15:34:59 +0100
commit57b2d68786a843a70bb410a9f38f6671c485d38b (patch)
treef19aa06f5e4a6ef8025dad20a0becc334e00b300
parent27c9e12a43fe2abd086116252a4981d899178c09 (diff)
downloadlinux-stable-57b2d68786a843a70bb410a9f38f6671c485d38b.tar.gz
linux-stable-57b2d68786a843a70bb410a9f38f6671c485d38b.tar.bz2
linux-stable-57b2d68786a843a70bb410a9f38f6671c485d38b.zip
atl1e: checking the status of atl1e_write_phy_reg
[ Upstream commit ff07d48d7bc0974d4f96a85a4df14564fb09f1ef ] atl1e_write_phy_reg() could fail. The fix issues an error message when it fails. Signed-off-by: Kangjie Lu <kjlu@umn.edu> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/net/ethernet/atheros/atl1e/atl1e_main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
index 974713b19ab6..5e1f03590aaf 100644
--- a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
+++ b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
@@ -478,7 +478,9 @@ static void atl1e_mdio_write(struct net_device *netdev, int phy_id,
{
struct atl1e_adapter *adapter = netdev_priv(netdev);
- atl1e_write_phy_reg(&adapter->hw, reg_num & MDIO_REG_ADDR_MASK, val);
+ if (atl1e_write_phy_reg(&adapter->hw,
+ reg_num & MDIO_REG_ADDR_MASK, val))
+ netdev_err(netdev, "write phy register failed\n");
}
static int atl1e_mii_ioctl(struct net_device *netdev,