From: Daniel Mack <daniel@caiaq.de>
To: Alexander Beregalov <a.beregalov@gmail.com>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rtc: mxc: fix memory leak
Date: Sat, 9 Jan 2010 19:53:47 +0100 [thread overview]
Message-ID: <20100109185347.GA8970@buzzloop.caiaq.de> (raw)
In-Reply-To: <1263055387-31340-1-git-send-email-a.beregalov@gmail.com>
On Sat, Jan 09, 2010 at 07:43:07PM +0300, Alexander Beregalov wrote:
> Free pdata before exit.
> Found by cppcheck.
>
> Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Acked-by: Daniel Mack <daniel@caiaq.de>
> ---
> drivers/rtc/rtc-mxc.c | 6 ++++--
> 1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/rtc/rtc-mxc.c b/drivers/rtc/rtc-mxc.c
> index 6bd5072..2642e6b 100644
> --- a/drivers/rtc/rtc-mxc.c
> +++ b/drivers/rtc/rtc-mxc.c
> @@ -396,8 +396,10 @@ static int __init mxc_rtc_probe(struct platform_device *pdev)
> pdata->ioaddr = ioremap(res->start, resource_size(res));
>
> clk = clk_get(&pdev->dev, "ckil");
> - if (IS_ERR(clk))
> - return PTR_ERR(clk);
> + if (IS_ERR(clk)) {
> + ret = PTR_ERR(clk);
> + goto exit_free_pdata;
> + }
>
> rate = clk_get_rate(clk);
> clk_put(clk);
> --
> 1.6.6
>
prev parent reply other threads:[~2010-01-09 18:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-09 16:43 [PATCH] rtc: mxc: fix memory leak Alexander Beregalov
2010-01-09 17:01 ` Américo Wang
2010-01-09 18:53 ` Daniel Mack [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=20100109185347.GA8970@buzzloop.caiaq.de \
--to=daniel@caiaq.de \
--cc=a.beregalov@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.