diff mbox series

ethernet: atl1e: checking the status of atl1e_write_phy_reg

Message ID 20181226042321.74123-1-kjlu@umn.edu
State Accepted, archived
Delegated to: David Miller
Headers show
Series ethernet: atl1e: checking the status of atl1e_write_phy_reg | expand

Commit Message

Kangjie Lu Dec. 26, 2018, 4:23 a.m. UTC
atl1e_write_phy_reg() could fail. The fix issues an error message when
it fails.

Signed-off-by: Kangjie Lu <kjlu@umn.edu>
---
 drivers/net/ethernet/atheros/atl1e/atl1e_main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

David Miller Dec. 28, 2018, 12:23 a.m. UTC | #1
From: Kangjie Lu <kjlu@umn.edu>
Date: Tue, 25 Dec 2018 22:23:19 -0600

> atl1e_write_phy_reg() could fail. The fix issues an error message when
> it fails.
> 
> Signed-off-by: Kangjie Lu <kjlu@umn.edu>

Applied, thanks.
diff mbox series

Patch

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,