Skip to content

Commit

Permalink
fs_enet: Fix a memory leak in fs_enet_mdio_probe
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Scott Wood authored and Jeff Garzik committed May 6, 2008
1 parent 46fa061 commit a86e2cb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/fs_enet/mii-fec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -236,6 +236,7 @@ static int __devinit fs_enet_mdio_probe(struct of_device *ofdev,
kfree(new_bus->irq);
out_unmap_regs:
iounmap(fec->fecp);
out_res:
out_fec:
kfree(fec);
out_mii:
Expand Down

0 comments on commit a86e2cb

Please sign in to comment.