]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
pmdomain: ti: Add a null pointer check to the omap_prm_domain_init
authorKunwu Chan <chentao@kylinos.cn>
Thu, 18 Jan 2024 05:42:57 +0000 (13:42 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 May 2025 05:44:24 +0000 (07:44 +0200)
commit984212fa6b4bc6d9ed58f5b0838e8d5af7679ce5
treeb503f2a4e28de17667cbf2335aa423e4d8959a40
parent6e5b601706ce05d94338cad598736d96bb8096c8
pmdomain: ti: Add a null pointer check to the omap_prm_domain_init

commit 5d7f58ee08434a33340f75ac7ac5071eea9673b3 upstream.

devm_kasprintf() returns a pointer to dynamically allocated memory
which can be NULL upon failure. Ensure the allocation was successful
by checking the pointer validity.

Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
Link: https://lore.kernel.org/r/20240118054257.200814-1-chentao@kylinos.cn
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
[Minor context change fixed]
Signed-off-by: Feng Liu <Feng.Liu3@windriver.com>
Signed-off-by: He Zhe <Zhe.He@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/soc/ti/omap_prm.c