linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ethernet: atl1e: checking the status of atl1e_write_phy_reg
@ 2018-12-26  4:23 Kangjie Lu
  2018-12-28  0:23 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Kangjie Lu @ 2018-12-26  4:23 UTC (permalink / raw)
  To: kjlu
  Cc: pakki001, Jay Cliburn, Chris Snook, David S. Miller, netdev,
	linux-kernel

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(-)

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,
-- 
2.17.2 (Apple Git-113)


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ethernet: atl1e: checking the status of atl1e_write_phy_reg
  2018-12-26  4:23 [PATCH] ethernet: atl1e: checking the status of atl1e_write_phy_reg Kangjie Lu
@ 2018-12-28  0:23 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-12-28  0:23 UTC (permalink / raw)
  To: kjlu; +Cc: pakki001, jcliburn, chris.snook, netdev, linux-kernel

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-12-28  0:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-26  4:23 [PATCH] ethernet: atl1e: checking the status of atl1e_write_phy_reg Kangjie Lu
2018-12-28  0:23 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).