From 13a013c1f9ce90b48a88d4990c6b5f079740d444 Mon Sep 17 00:00:00 2001 From: Christophe JAILLET Date: Fri, 27 May 2022 11:25:47 +0200 Subject: [PATCH] net: enetc: Use pci_release_region() to release some resources Some resources are allocated using pci_request_region(). It is more straightforward to release them with pci_release_region(). Fixes: 436351e93c36 ("enetc: Add mdio bus driver for the PCIe MDIO endpoint") Signed-off-by: Christophe JAILLET Reviewed-by: Claudiu Manoil Signed-off-by: David S. Miller --- drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c b/drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c index 15f37c5b8dc14..dafb26f81f95f 100644 --- a/drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c +++ b/drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c @@ -69,7 +69,7 @@ static int enetc_pci_mdio_probe(struct pci_dev *pdev, return 0; err_mdiobus_reg: - pci_release_mem_regions(pdev); + pci_release_region(pdev, 0); err_pci_mem_reg: pci_disable_device(pdev); err_pci_enable: @@ -88,7 +88,7 @@ static void enetc_pci_mdio_remove(struct pci_dev *pdev) mdiobus_unregister(bus); mdio_priv = bus->priv; iounmap(mdio_priv->hw->port); - pci_release_mem_regions(pdev); + pci_release_region(pdev, 0); pci_disable_device(pdev); } -- 2.39.5