Skip to content

Commit

Permalink
bfin_mac: fix memleak in mii_bus{probe|remove}
Browse files Browse the repository at this point in the history
Fix memory leak with miibus->irq

Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Denis Kirjanov authored and David S. Miller committed May 24, 2010
1 parent ee02a4e commit 7f267de
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/bfin_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1626,6 +1626,7 @@ static int __devinit bfin_mii_bus_probe(struct platform_device *pdev)
return 0;

out_err_mdiobus_register:
kfree(miibus->irq);
mdiobus_free(miibus);
out_err_alloc:
peripheral_free_list(pin_req);
Expand All @@ -1638,6 +1639,7 @@ static int __devexit bfin_mii_bus_remove(struct platform_device *pdev)
struct mii_bus *miibus = platform_get_drvdata(pdev);
platform_set_drvdata(pdev, NULL);
mdiobus_unregister(miibus);
kfree(miibus->irq);
mdiobus_free(miibus);
peripheral_free_list(pin_req);
return 0;
Expand Down

0 comments on commit 7f267de

Please sign in to comment.