Commit 18eeb4de authored by Christophe JAILLET's avatar Christophe JAILLET Committed by David S. Miller

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: 231ece36 ("enetc: Add mdio bus driver for the PCIe MDIO endpoint")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: default avatarClaudiu Manoil <claudiu.manoil@nxp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5e1eeef6
...@@ -69,7 +69,7 @@ static int enetc_pci_mdio_probe(struct pci_dev *pdev, ...@@ -69,7 +69,7 @@ static int enetc_pci_mdio_probe(struct pci_dev *pdev,
return 0; return 0;
err_mdiobus_reg: err_mdiobus_reg:
pci_release_mem_regions(pdev); pci_release_region(pdev, 0);
err_pci_mem_reg: err_pci_mem_reg:
pci_disable_device(pdev); pci_disable_device(pdev);
err_pci_enable: err_pci_enable:
...@@ -88,7 +88,7 @@ static void enetc_pci_mdio_remove(struct pci_dev *pdev) ...@@ -88,7 +88,7 @@ static void enetc_pci_mdio_remove(struct pci_dev *pdev)
mdiobus_unregister(bus); mdiobus_unregister(bus);
mdio_priv = bus->priv; mdio_priv = bus->priv;
iounmap(mdio_priv->hw->port); iounmap(mdio_priv->hw->port);
pci_release_mem_regions(pdev); pci_release_region(pdev, 0);
pci_disable_device(pdev); pci_disable_device(pdev);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment