diff options
author | Yuiko Oshino <yuiko.oshino@microchip.com> | 2021-10-22 11:13:53 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-10-24 13:37:48 +0100 |
commit | d6423d2ec39cce2bfca418c81ef51792891576bc (patch) | |
tree | be861ffcdb12cab22e357fc4354c522192a731d9 | |
parent | 1f83b835a3eaa5ae4bd825fb07182698bfc243ba (diff) | |
download | linux-d6423d2ec39cce2bfca418c81ef51792891576bc.tar.bz2 |
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 <yuiko.oshino@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/microchip/lan743x_main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/microchip/lan743x_main.c b/drivers/net/ethernet/microchip/lan743x_main.c index 9e8561cdc32a..3ac968b1c6ce 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. |