[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2025041530-clinic-genre-35f9@gregkh>
Date: Tue, 15 Apr 2025 16:13:46 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: Henry Martin <bsdhenrymartin@...il.com>
Cc: arnd@...db.de, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] misc: tps6594-pfsm: Add NULL check in
tps6594_pfsm_probe()
On Tue, Apr 01, 2025 at 09:34:04PM +0800, Henry Martin wrote:
> devm_kasprintf() returns NULL when memory allocation fails. Currently,
> tps6594_pfsm_probe() does not check for this case, which results in a
> NULL pointer dereference.
>
> Add NULL check after devm_kasprintf() to prevent this issue.
>
> Fixes: a0df3ef087f8 ("misc: tps6594-pfsm: Add driver for TI TPS6594 PFSM")
> Signed-off-by: Henry Martin <bsdhenrymartin@...il.com>
> ---
> drivers/misc/tps6594-pfsm.c | 2 ++
> 1 file changed, 2 insertions(+)
Someone else sent this before you did, sorry:
https://lore.kernel.org/r/20250311010511.1028269-1-chenyuan0y@gmail.com
Powered by blists - more mailing lists