powerpc/imc-pmu: Add a null pointer check in update_events_in_group()
authorKunwu Chan <chentao@kylinos.cn>
Sun, 26 Nov 2023 09:37:19 +0000 (17:37 +0800)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 13 Dec 2023 11:19:43 +0000 (22:19 +1100)
commit0a233867a39078ebb0f575e2948593bbff5826b3
treed7770ef74b874278837737de33753d9ba506f120
parente123015c0ba859cf48aa7f89c5016cc6e98e018d
powerpc/imc-pmu: Add a null pointer check in update_events_in_group()

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

Fixes: 885dcd709ba9 ("powerpc/perf: Add nest IMC PMU support")
Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20231126093719.1440305-1-chentao@kylinos.cn
arch/powerpc/perf/imc-pmu.c