mirror of
https://github.com/adulau/aha.git
synced 2024-12-30 12:46:17 +00:00
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>
This commit is contained in:
parent
46fa06170d
commit
a86e2cbe26
1 changed files with 2 additions and 1 deletions
|
@ -194,7 +194,7 @@ static int __devinit fs_enet_mdio_probe(struct of_device *ofdev,
|
||||||
|
|
||||||
ret = of_address_to_resource(ofdev->node, 0, &res);
|
ret = of_address_to_resource(ofdev->node, 0, &res);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
goto out_res;
|
||||||
|
|
||||||
snprintf(new_bus->id, MII_BUS_ID_SIZE, "%x", res.start);
|
snprintf(new_bus->id, MII_BUS_ID_SIZE, "%x", res.start);
|
||||||
|
|
||||||
|
@ -236,6 +236,7 @@ out_free_irqs:
|
||||||
kfree(new_bus->irq);
|
kfree(new_bus->irq);
|
||||||
out_unmap_regs:
|
out_unmap_regs:
|
||||||
iounmap(fec->fecp);
|
iounmap(fec->fecp);
|
||||||
|
out_res:
|
||||||
out_fec:
|
out_fec:
|
||||||
kfree(fec);
|
kfree(fec);
|
||||||
out_mii:
|
out_mii:
|
||||||
|
|
Loading…
Reference in a new issue