Skip to content

Commit d975cb7

Browse files
Dejin Zhengdavem330
authored andcommitted
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: 6517798 ("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>
1 parent 40e4730 commit d975cb7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ static int enetc_pci_mdio_probe(struct pci_dev *pdev,
7474
pci_disable_device(pdev);
7575
err_pci_enable:
7676
err_mdiobus_alloc:
77-
iounmap(port_regs);
7877
err_hw_alloc:
78+
iounmap(port_regs);
7979
err_ioremap:
8080
return err;
8181
}

0 commit comments

Comments
 (0)