* [PATCH net] net: phy: unlock on error in phy_probe()
@ 2023-02-27 10:03 Dan Carpenter
2023-02-27 10:11 ` Oleksij Rempel
2023-02-28 12:00 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2023-02-27 10:03 UTC (permalink / raw)
To: Oleksij Rempel
Cc: Heiner Kallweit, Russell King, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Russell King (Oracle),
netdev, kernel-janitors
If genphy_c45_read_eee_adv() fails then we need to do a reset and unlock
the &phydev->lock mutex before returning.
Fixes: 3eeca4e199ce ("net: phy: do not force EEE support")
Signed-off-by: Dan Carpenter <error27@gmail.com>
---
drivers/net/phy/phy_device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 3f8a64fb9d71..9e9fd8ff00f6 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -3146,7 +3146,7 @@ static int phy_probe(struct device *dev)
*/
err = genphy_c45_read_eee_adv(phydev, phydev->advertising_eee);
if (err)
- return err;
+ goto out;
/* There is no "enabled" flag. If PHY is advertising, assume it is
* kind of enabled.
--
2.39.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] net: phy: unlock on error in phy_probe()
2023-02-27 10:03 [PATCH net] net: phy: unlock on error in phy_probe() Dan Carpenter
@ 2023-02-27 10:11 ` Oleksij Rempel
2023-02-28 12:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Oleksij Rempel @ 2023-02-27 10:11 UTC (permalink / raw)
To: Dan Carpenter
Cc: Oleksij Rempel, Heiner Kallweit, Russell King, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Russell King (Oracle),
netdev, kernel-janitors
On Mon, Feb 27, 2023 at 01:03:22PM +0300, Dan Carpenter wrote:
> If genphy_c45_read_eee_adv() fails then we need to do a reset and unlock
> the &phydev->lock mutex before returning.
>
> Fixes: 3eeca4e199ce ("net: phy: do not force EEE support")
> Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de>
Thank you!
> ---
> drivers/net/phy/phy_device.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
> index 3f8a64fb9d71..9e9fd8ff00f6 100644
> --- a/drivers/net/phy/phy_device.c
> +++ b/drivers/net/phy/phy_device.c
> @@ -3146,7 +3146,7 @@ static int phy_probe(struct device *dev)
> */
> err = genphy_c45_read_eee_adv(phydev, phydev->advertising_eee);
> if (err)
> - return err;
> + goto out;
>
> /* There is no "enabled" flag. If PHY is advertising, assume it is
> * kind of enabled.
> --
> 2.39.1
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] net: phy: unlock on error in phy_probe()
2023-02-27 10:03 [PATCH net] net: phy: unlock on error in phy_probe() Dan Carpenter
2023-02-27 10:11 ` Oleksij Rempel
@ 2023-02-28 12:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-02-28 12:00 UTC (permalink / raw)
To: Dan Carpenter
Cc: linux, hkallweit1, linux, davem, edumazet, kuba, pabeni,
rmk+kernel, netdev, kernel-janitors
Hello:
This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:
On Mon, 27 Feb 2023 13:03:22 +0300 you wrote:
> If genphy_c45_read_eee_adv() fails then we need to do a reset and unlock
> the &phydev->lock mutex before returning.
>
> Fixes: 3eeca4e199ce ("net: phy: do not force EEE support")
> Signed-off-by: Dan Carpenter <error27@gmail.com>
> ---
> drivers/net/phy/phy_device.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Here is the summary with links:
- [net] net: phy: unlock on error in phy_probe()
https://git.kernel.org/netdev/net/c/8f9850dd8d23
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-02-28 12:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-27 10:03 [PATCH net] net: phy: unlock on error in phy_probe() Dan Carpenter
2023-02-27 10:11 ` Oleksij Rempel
2023-02-28 12:00 ` patchwork-bot+netdevbpf
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).