[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230531183256.48e1b893@booty>
Date: Wed, 31 May 2023 18:32:56 +0200
From: Luca Ceresoli <luca.ceresoli@...tlin.com>
To: Claudiu Beznea <claudiu.beznea@...rochip.com>
Cc: <mturquette@...libre.com>, <sboyd@...nel.org>, <nm@...com>,
<kristo@...nel.org>, <ssantosh@...nel.org>,
<michal.simek@...inx.com>, <aford173@...il.com>,
<mike.looijmans@...ic.nl>, <robert.hancock@...ian.com>,
<shawn.guo@...aro.org>, <fabio.estevam@...escale.com>,
<linux-clk@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-omap@...r.kernel.org>
Subject: Re: [PATCH 1/8] clk: vc5: check memory returned by kasprintf()
Hi Claudiu,
On Tue, 30 May 2023 12:39:06 +0300
Claudiu Beznea <claudiu.beznea@...rochip.com> wrote:
> kasprintf() returns a pointer to dynamically allocated memory.
> Pointer could be NULL in case allocation fails. Check pointer validity.
> Identified with coccinelle (kmerr.cocci script).
>
> Fixes: f491276a5168 ("clk: vc5: Allow Versaclock driver to support multiple instances")
> Signed-off-by: Claudiu Beznea <claudiu.beznea@...rochip.com>
I think this driver would benefit a bit of refactoring, moving all
those similar sections to a single function.
But for the time being your change is fine:
Reviewed-by: Luca Ceresoli <luca.ceresoli@...tlin.com>
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Powered by blists - more mailing lists