Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fcda74cc authored by Yuiko Oshino's avatar Yuiko Oshino Committed by Greg Kroah-Hartman
Browse files

net: ethernet: microchip: lan743x: Fix driver crash when lan743x_pm_resume fails



commit d6423d2ec39cce2bfca418c81ef51792891576bc upstream.

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>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 25d852a8
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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.