Thread (8 messages) 8 messages, 3 authors, 2014-01-07

[PATCH 2/2] phy-core: Don't propagate -ENOSUPP from phy_pm_runtime_get_sync to caller

flat view
STALE4668d

From: Hans de Goede <hidden>
Date: 2014-01-05 23:06:29
Subsystem: generic phy framework, the rest · Maintainers: Vinod Koul, Linus Torvalds

The phy-core allows phy_init and phy_power_on to be called multiple times,
but before this patch -ENOSUPP from phy_pm_runtime_get_sync would be
propagated to the caller for the 2nd and later calls.

Signed-off-by: Hans de Goede <redacted>
---
 drivers/phy/phy-core.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
index d7b992e..8ee6157 100644
--- a/drivers/phy/phy-core.c
+++ b/drivers/phy/phy-core.c
@@ -161,7 +161,8 @@ int phy_init(struct phy *phy)
 			dev_err(&phy->dev, "phy init failed --> %d\n", ret);
 			goto out;
 		}
-	}
+	} else
+		ret = 0; /* Override possible ret == -ENOTSUPP */
 
 out:
 	mutex_unlock(&phy->mutex);
@@ -209,7 +210,8 @@ int phy_power_on(struct phy *phy)
 			dev_err(&phy->dev, "phy poweron failed --> %d\n", ret);
 			goto out;
 		}
-	}
+	} else
+		ret = 0; /* Override possible ret == -ENOTSUPP */
 
 out:
 	mutex_unlock(&phy->mutex);
-- 
1.8.4.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help