Skip to content

Commit 699d80b

Browse files
microchip1ksacilotto
authored andcommitted
net: ethernet: microchip: lan743x: Fix driver crash when lan743x_pm_resume fails
BugLink: https://bugs.launchpad.net/bugs/1952785 commit d6423d2 upstream. The driver needs to clean up and return when the initialization fails on resume. Fixes: 23f0703 ("lan743x: Add main source files for new lan743x driver") Signed-off-by: Yuiko Oshino <[email protected]> Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Kamal Mostafa <[email protected]> Signed-off-by: Stefan Bader <[email protected]>
1 parent 81b4d19 commit 699d80b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/net/ethernet/microchip/lan743x_main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3039,6 +3039,8 @@ static int lan743x_pm_resume(struct device *dev)
30393039
if (ret) {
30403040
netif_err(adapter, probe, adapter->netdev,
30413041
"lan743x_hardware_init returned %d\n", ret);
3042+
lan743x_pci_cleanup(adapter);
3043+
return ret;
30423044
}
30433045

30443046
/* open netdev when netdev is at running state while resume.

0 commit comments

Comments
 (0)