mfd: tps6594: Add null pointer check to tps6594_device_init()
authorKunwu Chan <chentao@kylinos.cn>
Fri, 8 Dec 2023 03:33:20 +0000 (11:33 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jan 2024 23:35:49 +0000 (15:35 -0800)
commitf53d8c6c6ecca4cbba1e52f7e0286ff26af8b9be
tree8b29478f5fe1770c7d9494639477261ae08a5c1b
parentbd4d5b6fe15d03a27b1e5295d9963e45c0844d6b
mfd: tps6594: Add null pointer check to tps6594_device_init()

[ Upstream commit 825906f2ebe83977d747d8bce61675dddd72485d ]

devm_kasprintf() returns a pointer to dynamically allocated memory
which can be NULL upon failure.

Fixes: 325bec7157b3 ("mfd: tps6594: Add driver for TI TPS6594 PMIC")
Suggested-by: Lee Jones <lee@kernel.org>
Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
Link: https://lore.kernel.org/r/20231208033320.49345-1-chentao@kylinos.cn
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mfd/tps6594-core.c