Skip to content

Commit

Permalink
net: ethernet: microchip: lan743x: Fix driver crash when lan743x_pm_r…
Browse files Browse the repository at this point in the history
…esume fails

commit d6423d2ec39cce2bfca418c81ef51792891576bc 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]>
  • Loading branch information
microchip1 authored and DozNaka committed Apr 10, 2022
1 parent 520dd9a commit 2576548
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/ethernet/microchip/lan743x_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3003,6 +3003,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.
Expand Down

0 comments on commit 2576548

Please sign in to comment.