[PATCH net 1/1] net: stmmac: Fix clock handling on remove path

Wong Vee Khee vee.khee.wong at intel.com
Fri Sep 25 05:54:06 EDT 2020

While unloading the dwmac-intel driver, clk_disable_unprepare() is
being called twice in stmmac_dvr_remove() and
intel_eth_pci_remove(). This causes kernel panic on the second call.

Removing the second call of clk_disable_unprepare() in

Fixes: 09f012e64e4b ("stmmac: intel: Fix clock handling on error and remove paths")
Cc: Andy Shevchenko <andriy.shevchenko at linux.intel.com>
Reviewed-by: Voon Weifeng <weifeng.voon at intel.com>
Signed-off-by: Wong Vee Khee <vee.khee.wong at intel.com>
 drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
index 2ac9dfb3462c..9e6d60e75f85 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
@@ -653,7 +653,6 @@ static void intel_eth_pci_remove(struct pci_dev *pdev)
-	clk_disable_unprepare(priv->plat->stmmac_clk);
 	pcim_iounmap_regions(pdev, BIT(0));

More information about the linux-arm-kernel mailing list