Commit d6423d2e authored by Yuiko Oshino's avatar Yuiko Oshino Committed by David S. Miller

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: 23f0703c ("lan743x: Add main source files for new lan743x driver")
Signed-off-by: default avatarYuiko Oshino <yuiko.oshino@microchip.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1f83b835
...@@ -3019,6 +3019,8 @@ static int lan743x_pm_resume(struct device *dev) ...@@ -3019,6 +3019,8 @@ static int lan743x_pm_resume(struct device *dev)
if (ret) { if (ret) {
netif_err(adapter, probe, adapter->netdev, netif_err(adapter, probe, adapter->netdev,
"lan743x_hardware_init returned %d\n", ret); "lan743x_hardware_init returned %d\n", ret);
lan743x_pci_cleanup(adapter);
return ret;
} }
/* open netdev when netdev is at running state while resume. /* open netdev when netdev is at running state while resume.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment