lkml.org 
[lkml]   [2022]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] stmmac: intel: Simplify intel_eth_pci_remove()
Date
There is no point to call pcim_iounmap_regions() in the remove function,
this frees a managed resource that would be release by the framework
anyway.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
This patch is speculative.
Sometimes the order of releasing managed resources is tricky.

Just a few drivers have this pattern, while many call pcim_iomap_regions().
If I'm right and this patch is reviewed and merged, I'll look at the
other files if they also can be simplified a bit.
---
drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
index 9f38642f86ce..f68d23051557 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
@@ -1136,8 +1136,6 @@ static void intel_eth_pci_remove(struct pci_dev *pdev)

clk_disable_unprepare(plat->stmmac_clk);
clk_unregister_fixed_rate(priv->plat->stmmac_clk);
-
- pcim_iounmap_regions(pdev, BIT(0));
}

static int __maybe_unused intel_eth_pci_suspend(struct device *dev)
--
2.34.1
\
 
 \ /
  Last update: 2022-07-30 20:21    [W:0.216 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site