[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211101082458.305646755@linuxfoundation.org>
Date: Mon, 1 Nov 2021 10:17:40 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Yuiko Oshino <yuiko.oshino@...rochip.com>,
"David S. Miller" <davem@...emloft.net>
Subject: [PATCH 4.19 28/35] net: ethernet: microchip: lan743x: Fix driver crash when lan743x_pm_resume fails
From: Yuiko Oshino <yuiko.oshino@...rochip.com>
commit d6423d2ec39cce2bfca418c81ef51792891576bc upstream.
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@...rochip.com>
Signed-off-by: David S. Miller <davem@...emloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/net/ethernet/microchip/lan743x_main.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/net/ethernet/microchip/lan743x_main.c
+++ b/drivers/net/ethernet/microchip/lan743x_main.c
@@ -3003,6 +3003,8 @@ static int lan743x_pm_resume(struct devi
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.
Powered by blists - more mailing lists