diff options
author | Kangjie Lu <kjlu@umn.edu> | 2018-12-25 22:23:19 -0600 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-12-27 16:23:12 -0800 |
commit | ff07d48d7bc0974d4f96a85a4df14564fb09f1ef (patch) | |
tree | 80a92bb3505bba84b31a72a6f81fe4b3bb3719eb /drivers/net/ethernet/atheros/atl1e | |
parent | e49505f7255be8ced695919c08a29bf2c3d79616 (diff) | |
download | linux-stable-ff07d48d7bc0974d4f96a85a4df14564fb09f1ef.tar.gz linux-stable-ff07d48d7bc0974d4f96a85a4df14564fb09f1ef.tar.bz2 linux-stable-ff07d48d7bc0974d4f96a85a4df14564fb09f1ef.zip |
atl1e: checking the status of atl1e_write_phy_reg
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>
Diffstat (limited to 'drivers/net/ethernet/atheros/atl1e')
-rw-r--r-- | drivers/net/ethernet/atheros/atl1e/atl1e_main.c | 4 |
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 9dc6da039a6d..3164aad29bcf 100644 --- a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c +++ b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c @@ -473,7 +473,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, |