]> 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>
Sat, 13 Apr 2024 11:07:30 +0000 (13:07 +0200)
commitce666cecc09c0f92d5f86d89d8068ecfcf723a7e
tree9bafe569d7d957e52e74af888d26b6a76d026852
parenta7b862abe4840434eaee818557a487c471b4e783
pmdomain: ti: Add a null pointer check to the omap_prm_domain_init

[ Upstream commit 5d7f58ee08434a33340f75ac7ac5071eea9673b3 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pmdomain/ti/omap_prm.c