summaryrefslogtreecommitdiffstats
path: root/drivers/net/fs_enet
diff options
context:
space:
mode:
authorScott Wood <scottwood@freescale.com>2008-05-02 13:42:41 -0500
committerJeff Garzik <jgarzik@redhat.com>2008-05-06 12:22:37 -0400
commita86e2cbe263c193a70b2e5c5a0c7e53ed39fc0ad (patch)
treedfebd56cca8ef6bcea025c6018a3f37bff969e18 /drivers/net/fs_enet
parent46fa06170d59b6b9951d09354829d85090f0d911 (diff)
downloadop-kernel-dev-a86e2cbe263c193a70b2e5c5a0c7e53ed39fc0ad.zip
op-kernel-dev-a86e2cbe263c193a70b2e5c5a0c7e53ed39fc0ad.tar.gz
fs_enet: Fix a memory leak in fs_enet_mdio_probe
There are more memory leaks in the !PPC_CPM_NEW_BINDING case, but that code will disappear soon along with arch/ppc. Reported by Daniel Marjamki <danielm77@spray.se> at http://bugzilla.kernel.org/show_bug.cgi?id=10591 Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/fs_enet')
-rw-r--r--drivers/net/fs_enet/mii-fec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/fs_enet/mii-fec.c b/drivers/net/fs_enet/mii-fec.c
index ba75efc..f0014cf 100644
--- a/drivers/net/fs_enet/mii-fec.c
+++ b/drivers/net/fs_enet/mii-fec.c
@@ -194,7 +194,7 @@ static int __devinit fs_enet_mdio_probe(struct of_device *ofdev,
ret = of_address_to_resource(ofdev->node, 0, &res);
if (ret)
- return ret;
+ goto out_res;
snprintf(new_bus->id, MII_BUS_ID_SIZE, "%x", res.start);
@@ -236,6 +236,7 @@ out_free_irqs:
kfree(new_bus->irq);
out_unmap_regs:
iounmap(fec->fecp);
+out_res:
out_fec:
kfree(fec);
out_mii:
OpenPOWER on IntegriCloud