[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1311331653.3312.10.camel@odin>
Date: Fri, 22 Jul 2011 11:47:33 +0100
From: Liam Girdwood <lrg@...nel.org>
To: Axel Lin <axel.lin@...il.com>
Cc: linux-kernel@...r.kernel.org, Graeme Gregory <gg@...mlogic.co.uk>,
Liam Girdwood <lrg@...com>,
Mark Brown <broonie@...nsource.wolfsonmicro.com>
Subject: Re: [PATCH] regulator: tps65910: Fix a memory leak in
tps65910_probe error path
On Sun, 2011-07-10 at 18:52 +0800, Axel Lin wrote:
> Fix a memory leak if chip id is not matched.
>
> Signed-off-by: Axel Lin <axel.lin@...il.com>
> ---
> drivers/regulator/tps65910-regulator.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/regulator/tps65910-regulator.c b/drivers/regulator/tps65910-regulator.c
> index fe8dc02..e15aac6 100644
> --- a/drivers/regulator/tps65910-regulator.c
> +++ b/drivers/regulator/tps65910-regulator.c
> @@ -909,6 +909,7 @@ static __devinit int tps65910_probe(struct platform_device *pdev)
> break;
> default:
> pr_err("Invalid tps chip version\n");
> + kfree(pmic);
> return -ENODEV;
> }
>
Applied.
Thanks
Liam
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists