All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] phylib: phy_startup() should return an error code on failure
@ 2012-07-05 20:33 Timur Tabi
  2012-07-05 20:33 ` [U-Boot] [PATCH 2/2] net: abort network initialization if the PHY driver fails Timur Tabi
  2012-07-11 18:31 ` [U-Boot] [PATCH 1/2] phylib: phy_startup() should return an error code on failure Joe Hershberger
  0 siblings, 2 replies; 5+ messages in thread
From: Timur Tabi @ 2012-07-05 20:33 UTC (permalink / raw)
  To: u-boot

phy_startup() calls the PHY driver's startup function, but it ignores the
return code from that function, and so it never returns any failures.

Signed-off-by: Timur Tabi <timur@freescale.com>
---
 drivers/net/phy/phy.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 7d327f7..baef60f 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -723,10 +723,13 @@ struct phy_device *phy_connect(struct mii_dev *bus, int addr,
 	return phydev;
 }
 
+/*
+ * Start the PHY.  Returns 0 on success, or a negative error code.
+ */
 int phy_startup(struct phy_device *phydev)
 {
 	if (phydev->drv->startup)
-		phydev->drv->startup(phydev);
+		return phydev->drv->startup(phydev);
 
 	return 0;
 }
-- 
1.7.3.4

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

end of thread, other threads:[~2012-07-11 18:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-05 20:33 [U-Boot] [PATCH 1/2] phylib: phy_startup() should return an error code on failure Timur Tabi
2012-07-05 20:33 ` [U-Boot] [PATCH 2/2] net: abort network initialization if the PHY driver fails Timur Tabi
2012-07-06  0:31   ` Nobuhiro Iwamatsu
2012-07-06  1:58     ` Tabi Timur-B04825
2012-07-11 18:31 ` [U-Boot] [PATCH 1/2] phylib: phy_startup() should return an error code on failure Joe Hershberger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.