Skip to content

Commit

Permalink
net: stmmac: Fix clock handling on remove path
Browse files Browse the repository at this point in the history
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
intel_eth_pci_remove().

Fixes: 09f012e ("stmmac: intel: Fix clock handling on error and remove paths")
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Voon Weifeng <weifeng.voon@intel.com>
Signed-off-by: Wong Vee Khee <vee.khee.wong@intel.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
wvk86 authored and davem330 committed Sep 25, 2020
1 parent 1dac3b1 commit ac322f8
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,6 @@ static void intel_eth_pci_remove(struct pci_dev *pdev)

pci_free_irq_vectors(pdev);

clk_disable_unprepare(priv->plat->stmmac_clk);
clk_unregister_fixed_rate(priv->plat->stmmac_clk);

pcim_iounmap_regions(pdev, BIT(0));
Expand Down

0 comments on commit ac322f8

Please sign in to comment.