]> Gentwo Git Trees - linux/.git/commit
powerpc/83xx: Add a null pointer check to mcu_gpiochip_add
authorKunwu Chan <chentao@kylinos.cn>
Mon, 15 Jan 2024 09:43:30 +0000 (17:43 +0800)
committerMadhavan Srinivasan <maddy@linux.ibm.com>
Tue, 11 Nov 2025 09:09:25 +0000 (14:39 +0530)
commit2617bd81ae54128e63e764c48935e572e3dee501
tree786f6fc9c4dda8593cc9148337bb0e2301dcd04f
parentf90d28443b1f4dbbbdcfea1be5295f6903acc94c
powerpc/83xx: Add a null pointer check to mcu_gpiochip_add

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>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20240115094330.33014-1-chentao@kylinos.cn
arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c