Skip to content

Commit d6423d2

Browse files
microchip1davem330
authored andcommitted
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: 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]>
1 parent 1f83b83 commit d6423d2

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
@@ -3019,6 +3019,8 @@ static int lan743x_pm_resume(struct device *dev)
30193019
if (ret) {
30203020
netif_err(adapter, probe, adapter->netdev,
30213021
"lan743x_hardware_init returned %d\n", ret);
3022+
lan743x_pci_cleanup(adapter);
3023+
return ret;
30223024
}
30233025

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

0 commit comments

Comments
 (0)