powerpc/powernv: Add a null pointer check in opal_event_init()
authorKunwu Chan <chentao@kylinos.cn>
Mon, 27 Nov 2023 03:07:55 +0000 (11:07 +0800)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 13 Dec 2023 11:19:03 +0000 (22:19 +1100)
commit8649829a1dd25199bbf557b2621cedb4bf9b3050
tree11206dbbdb051ebca8a39380a15f10578c9a1cb2
parent9a260f2dd827bbc82cc60eb4f4d8c22707d80742
powerpc/powernv: Add a null pointer check in opal_event_init()

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

Fixes: 2717a33d6074 ("powerpc/opal-irqchip: Use interrupt names if present")
Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20231127030755.1546750-1-chentao@kylinos.cn
arch/powerpc/platforms/powernv/opal-irqchip.c