net: stmmac: qcom-ethqos: fix qcom_ethqos_serdes_powerup()
Subsystems (6)
PATCH 1/1 net: stmmac: qcom-ethqos: fix qcom_ethqos_serdes_powerup()
Add cleanup for failure paths in qcom_ethqos_serdes_powerup(). This was missing calling phy_exit() and phy_power_off() at appropriate failure points.
--- .../net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c +10 -2
@@ -659,10 +659,18 @@ static int qcom_ethqos_serdes_powerup(struct net_device *ndev, void *priv)return ret; ret =phy_power_on (ethqos->serdes_phy); -if (ret) +if (ret) { +phy_exit (ethqos->serdes_phy);return ret; + } -return phy_set_speed (ethqos->serdes_phy, ethqos->serdes_speed); + ret =phy_set_speed (ethqos->serdes_phy, ethqos->serdes_speed); +if (ret) { +phy_power_off (ethqos->serdes_phy); +phy_exit (ethqos->serdes_phy); + } + +return ret; }static void qcom_ethqos_serdes_powerdown (struct net_device *ndev,void *priv)
Signature · 1 line
2.47.3
Quoted 24 lines · Russell King (Oracle)
Add cleanup for failure paths in
qcom_ethqos_serdes_powerup(). This was missing callingphy_exit()andphy_power_off()at appropriate failure points.Signed-off-by Russell King (Oracle) <[email protected]>--- .../net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c +3
-2@@ -659,10 +659,18 @@ static int qcom_ethqos_serdes_powerup(struct net_device *ndev, void *priv)return ret; ret =phy_power_on (ethqos->serdes_phy); -if (ret) +if (ret) { +phy_exit (ethqos->serdes_phy);return ret; + } -return phy_set_speed (ethqos->serdes_phy, ethqos->serdes_speed);
drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c static int qcom_ethqos_serdes_powerup(struct net_device *ndev, void *priv) · line 676
Quoted 10 lines
drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c +7
-0+ ret =phy_set_speed (ethqos->serdes_phy, ethqos->serdes_speed); +if (ret) { +phy_power_off (ethqos->serdes_phy); +phy_exit (ethqos->serdes_phy); + } + +return ret; }static void qcom_ethqos_serdes_powerdown (struct net_device *ndev,void *priv)
Quoted 37 lines · Russell King (Oracle)
Add cleanup for failure paths in
qcom_ethqos_serdes_powerup(). This was missing callingphy_exit()andphy_power_off()at appropriate failure points.Signed-off-by Russell King (Oracle) <[email protected]>--- .../net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c +10
-2@@ -659,10 +659,18 @@ static int qcom_ethqos_serdes_powerup(struct net_device *ndev, void *priv)return ret; ret =phy_power_on (ethqos->serdes_phy); -if (ret) +if (ret) { +phy_exit (ethqos->serdes_phy);return ret; + } -return phy_set_speed (ethqos->serdes_phy, ethqos->serdes_speed); + ret =phy_set_speed (ethqos->serdes_phy, ethqos->serdes_speed); +if (ret) { +phy_power_off (ethqos->serdes_phy); +phy_exit (ethqos->serdes_phy); + } + +return ret; }static void qcom_ethqos_serdes_powerdown (struct net_device *ndev,void *priv)Signature · 1 line
2.47.3
Ayaan
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Fri, 06 Feb 2026 17:19:21 +0000 you wrote:
Add cleanup for failure paths in
qcom_ethqos_serdes_powerup(). This was missing callingphy_exit()andphy_power_off()at appropriate failure points.Signed-off-by Russell King (Oracle) <[email protected]>--- .../net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
Here is the summary with links:
- [net-next] net: stmmac: qcom-ethqos: fix qcom_ethqos_serdes_powerup()
https://git.kernel.org/netdev/net-next/c/3a4687366148
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html