summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorDejin Zheng <zhengdejin5@gmail.com>2020-05-04 15:01:27 +0300
committerDavid S. Miller <davem@davemloft.net>2020-05-04 20:51:20 +0300
commitd975cb7ea915e64a3ebcfef8a33051f3e6bf22a8 (patch)
treed6f758c85b8b2a59ca82e635fafd1dc599e9046e /drivers/net
parent40e473071dbad04316ddc3613c3a3d1c75458299 (diff)
downloadlinux-d975cb7ea915e64a3ebcfef8a33051f3e6bf22a8.tar.xz
net: enetc: fix an issue about leak system resources
the related system resources were not released when enetc_hw_alloc() return error in the enetc_pci_mdio_probe(), add iounmap() for error handling label "err_hw_alloc" to fix it. Fixes: 6517798dd3432a ("enetc: Make MDIO accessors more generic and export to include/linux/fsl") Cc: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c b/drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c
index ebc635f8a4cc..15f37c5b8dc1 100644
--- a/drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c
+++ b/drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c
@@ -74,8 +74,8 @@ err_pci_mem_reg:
pci_disable_device(pdev);
err_pci_enable:
err_mdiobus_alloc:
- iounmap(port_regs);
err_hw_alloc:
+ iounmap(port_regs);
err_ioremap:
return err;
}