Commit 9a260f2d authored by Kunwu Chan's avatar Kunwu Chan Committed by Michael Ellerman
Browse files

powerpc/powernv: Add a null pointer check to scom_debug_init_one()



kasprintf() returns a pointer to dynamically allocated memory
which can be NULL upon failure.
Add a null pointer check, and release 'ent' to avoid memory leaks.

Fixes: bfd2f0d4 ("powerpc/powernv: Get rid of old scom_controller abstraction")
Signed-off-by: default avatarKunwu Chan <chentao@kylinos.cn>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20231208085937.107210-1-chentao@kylinos.cn
parent f46c8a75
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment