* [PATCH] net: davicom: Fix regulator not turned off on failed probe
@ 2021-04-11 9:02 Christophe JAILLET
2021-04-12 0:00 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2021-04-11 9:02 UTC (permalink / raw)
To: davem, kuba, paul, andrew, gustavoars, paulburton, Zubair.Kakakhel
Cc: netdev, linux-kernel, kernel-janitors, Christophe JAILLET
When the probe fails, we must disable the regulator that was previously
enabled.
This patch is a follow-up to commit ac88c531a5b3
("net: davicom: Fix regulator not turned off on failed probe") which missed
one case.
Fixes: 7994fe55a4a2 ("dm9000: Add regulator and reset support to dm9000")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/net/ethernet/davicom/dm9000.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/davicom/dm9000.c b/drivers/net/ethernet/davicom/dm9000.c
index 252adfa5d837..8a9096aa85cd 100644
--- a/drivers/net/ethernet/davicom/dm9000.c
+++ b/drivers/net/ethernet/davicom/dm9000.c
@@ -1471,8 +1471,10 @@ dm9000_probe(struct platform_device *pdev)
/* Init network device */
ndev = alloc_etherdev(sizeof(struct board_info));
- if (!ndev)
- return -ENOMEM;
+ if (!ndev) {
+ ret = -ENOMEM;
+ goto out_regulator_disable;
+ }
SET_NETDEV_DEV(ndev, &pdev->dev);
--
2.27.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: davicom: Fix regulator not turned off on failed probe
2021-04-11 9:02 [PATCH] net: davicom: Fix regulator not turned off on failed probe Christophe JAILLET
@ 2021-04-12 0:00 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-04-12 0:00 UTC (permalink / raw)
To: Christophe JAILLET
Cc: davem, kuba, paul, andrew, gustavoars, paulburton,
Zubair.Kakakhel, netdev, linux-kernel, kernel-janitors
Hello:
This patch was applied to netdev/net.git (refs/heads/master):
On Sun, 11 Apr 2021 11:02:08 +0200 you wrote:
> When the probe fails, we must disable the regulator that was previously
> enabled.
>
> This patch is a follow-up to commit ac88c531a5b3
> ("net: davicom: Fix regulator not turned off on failed probe") which missed
> one case.
>
> [...]
Here is the summary with links:
- net: davicom: Fix regulator not turned off on failed probe
https://git.kernel.org/netdev/net/c/31457db3750c
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] 2+ messages in thread
end of thread, other threads:[~2021-04-12 0:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-11 9:02 [PATCH] net: davicom: Fix regulator not turned off on failed probe Christophe JAILLET
2021-04-12 0: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).