From: Andrew Morton <akpm@linux-foundation.org>
To: Scott Wood <scottwood@freescale.com>
Cc: jgarzik@pobox.com, netdev@vger.kernel.org
Subject: Re: [PATCH] fs_enet: Fix a memory leak in fs_enet_mdio_probe
Date: Fri, 2 May 2008 11:37:44 -0700 [thread overview]
Message-ID: <20080502113744.77e81c7d.akpm@linux-foundation.org> (raw)
In-Reply-To: <20080502183118.GA2918@loki.buserror.net>
On Fri, 2 May 2008 13:31:18 -0500 Scott Wood <scottwood@freescale.com> wrote:
> There are more memory leaks in the !PPC_CPM_NEW_BINDING case, but that code
> will disappear soon along with arch/ppc.
>
> Signed-off-by: Scott Wood <scottwood@freescale.com>
> ---
> drivers/net/fs_enet/mii-fec.c | 3 ++-
> 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:
It would be nice to credit Daniel Marjamki <danielm77@spray.se> in the
changelog, please. Perhaps a mention of
http://bugzilla.kernel.org/show_bug.cgi?id=10591 also.
prev parent reply other threads:[~2008-05-02 18:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-02 18:31 [PATCH] fs_enet: Fix a memory leak in fs_enet_mdio_probe Scott Wood
2008-05-02 18:37 ` Andrew Morton [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080502113744.77e81c7d.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=jgarzik@pobox.com \
--cc=netdev@vger.kernel.org \
--cc=scottwood@freescale.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).