net: ethernet: microchip: lan743x: Fix driver crash when lan743x_pm_resume fails
Subsystems (3)
PATCH 1/1 net: ethernet: microchip: lan743x: Fix driver crash when lan743x_pm_resume fails
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 <[email protected]>
--- drivers/net/ethernet/microchip/lan743x_main.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/ethernet/microchip/lan743x_main.c +2 -0
@@ -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.
Signature · 1 line
2.25.1
This patch was applied to netdev/net.git (master) by David S. Miller <[email protected]>:
Hello:
This patch was applied to netdev/net.git (master)
by David S. Miller <[email protected]>:
Quoted 7 lines · 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 <[email protected]>--- 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!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html