netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] net: ethernet: microchip: lan743x: Fix driver crash when lan743x_pm_resume fails
@ 2021-10-22 15:13 Yuiko Oshino
  2021-10-24 12:40 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Yuiko Oshino @ 2021-10-22 15:13 UTC (permalink / raw)
  To: davem, netdev; +Cc: bryan.whitehead, UNGLinuxDriver, Yuiko Oshino

The driver needs to clean up and return when the initialization fails on resume.

Fixes: 23f0703c125b ("lan743x: Add main source files for new lan743x driver")
Signed-off-by: Yuiko Oshino <yuiko.oshino@microchip.com>
---
 drivers/net/ethernet/microchip/lan743x_main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/microchip/lan743x_main.c b/drivers/net/ethernet/microchip/lan743x_main.c
index 03d02403c19e..3f8cce7cce77 100644
--- a/drivers/net/ethernet/microchip/lan743x_main.c
+++ b/drivers/net/ethernet/microchip/lan743x_main.c
@@ -3019,6 +3019,8 @@ static int lan743x_pm_resume(struct device *dev)
 	if (ret) {
 		netif_err(adapter, probe, adapter->netdev,
 			  "lan743x_hardware_init returned %d\n", ret);
+		lan743x_pci_cleanup(adapter);
+		return ret;
 	}
 
 	/* open netdev when netdev is at running state while resume.
-- 
2.25.1


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

* Re: [PATCH net] net: ethernet: microchip: lan743x: Fix driver crash when lan743x_pm_resume fails
  2021-10-22 15:13 [PATCH net] net: ethernet: microchip: lan743x: Fix driver crash when lan743x_pm_resume fails Yuiko Oshino
@ 2021-10-24 12:40 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-10-24 12:40 UTC (permalink / raw)
  To: Yuiko Oshino; +Cc: davem, netdev, bryan.whitehead, UNGLinuxDriver

Hello:

This patch was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:

On Fri, 22 Oct 2021 11:13:53 -0400 you wrote:
> The driver needs to clean up and return when the initialization fails on resume.
> 
> Fixes: 23f0703c125b ("lan743x: Add main source files for new lan743x driver")
> Signed-off-by: Yuiko Oshino <yuiko.oshino@microchip.com>
> ---
>  drivers/net/ethernet/microchip/lan743x_main.c | 2 ++
>  1 file changed, 2 insertions(+)

Here is the summary with links:
  - [net] net: ethernet: microchip: lan743x: Fix driver crash when lan743x_pm_resume fails
    https://git.kernel.org/netdev/net/c/d6423d2ec39c

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-10-24 12:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-22 15:13 [PATCH net] net: ethernet: microchip: lan743x: Fix driver crash when lan743x_pm_resume fails Yuiko Oshino
2021-10-24 12:40 ` 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).