[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ff7f2406-f6c3-62ae-6c54-9ace0b694ffb@gmail.com>
Date: Mon, 21 Oct 2019 13:46:44 -0700
From: Florian Fainelli <f.fainelli@...il.com>
To: Navid Emamdoost <navid.emamdoost@...il.com>
Cc: emamd001@....edu, kjlu@....edu, smccaman@....edu,
Daniel Lezcano <daniel.lezcano@...aro.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ray Jui <rjui@...adcom.com>,
Scott Branden <sbranden@...adcom.com>,
bcm-kernel-feedback-list@...adcom.com,
Eric Anholt <eric@...olt.net>,
Stefan Wahren <wahrenst@....net>, linux-kernel@...r.kernel.org,
linux-rpi-kernel@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] locking/atomics: Fix memory leak in bcm2835_timer_init
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@...il.com>
>
> Fixes: 84c39b8b7d46 ("clocksource/drivers/bcm2835_timer: Unmap region obtained by of_iomap")
> Signed-off-by: Navid Emamdoost <navid.emamdoost@...il.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
Powered by blists - more mailing lists