From: Florian Fainelli <f.fainelli@gmail.com>
To: Navid Emamdoost <navid.emamdoost@gmail.com>
Cc: emamd001@umn.edu, kjlu@umn.edu, smccaman@umn.edu,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Thomas Gleixner <tglx@linutronix.de>, Ray Jui <rjui@broadcom.com>,
Scott Branden <sbranden@broadcom.com>,
bcm-kernel-feedback-list@broadcom.com,
Eric Anholt <eric@anholt.net>, Stefan Wahren <wahrenst@gmx.net>,
linux-kernel@vger.kernel.org,
linux-rpi-kernel@lists.infradead.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] locking/atomics: Fix memory leak in bcm2835_timer_init
Date: Mon, 21 Oct 2019 13:46:44 -0700 [thread overview]
Message-ID: <ff7f2406-f6c3-62ae-6c54-9ace0b694ffb@gmail.com> (raw)
In-Reply-To: <20191021201400.2760-1-navid.emamdoost@gmail.com>
On 10/21/19 1:13 PM, Navid Emamdoost wrote:
> In the impelementation of bcm2835_timer_init() the allocated memory for
> timer should be released if setup_irq() fails.
s/impelementation/implementation/ and also the subject should probably
be changed to better reflect the scope of the patch. With that:
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
>
> Fixes: 84c39b8b7d46 ("clocksource/drivers/bcm2835_timer: Unmap region obtained by of_iomap")
> Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
> ---
> drivers/clocksource/bcm2835_timer.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/clocksource/bcm2835_timer.c b/drivers/clocksource/bcm2835_timer.c
> index 2b196cbfadb6..7b27cc53ce9c 100644
> --- a/drivers/clocksource/bcm2835_timer.c
> +++ b/drivers/clocksource/bcm2835_timer.c
> @@ -121,6 +121,7 @@ static int __init bcm2835_timer_init(struct device_node *node)
> ret = setup_irq(irq, &timer->act);
> if (ret) {
> pr_err("Can't set up timer IRQ\n");
> + kfree(timer);
> goto err_iounmap;
> }
>
>
--
Florian
prev parent reply other threads:[~2019-10-21 20:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-21 20:13 Navid Emamdoost
2019-10-21 20:46 ` Florian Fainelli [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=ff7f2406-f6c3-62ae-6c54-9ace0b694ffb@gmail.com \
--to=f.fainelli@gmail.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=daniel.lezcano@linaro.org \
--cc=emamd001@umn.edu \
--cc=eric@anholt.net \
--cc=kjlu@umn.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=navid.emamdoost@gmail.com \
--cc=rjui@broadcom.com \
--cc=sbranden@broadcom.com \
--cc=smccaman@umn.edu \
--cc=tglx@linutronix.de \
--cc=wahrenst@gmx.net \
/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
all inboxes | Powered by JetHome®