powerpc/xive: Add missing null check after calling kmalloc
authorAmmar Faizi <ammarfaizi2@gmail.com>
Sun, 26 Dec 2021 13:54:02 +0000 (20:54 +0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 09:54:09 +0000 (10:54 +0100)
commit74988d017dd19fef5f808a4f0162d2e21bd27001
tree69cf15cb492d53ba0104a6119351d74a7f96bbf5
parent588e0b81ce38b2806774f840d7528697bc971000
powerpc/xive: Add missing null check after calling kmalloc

[ Upstream commit 18dbfcdedc802f9500b2c29794f22a31d27639c0 ]

Commit 930914b7d528fc ("powerpc/xive: Add a debugfs file to dump
internal XIVE state") forgot to add a null check.

Add it.

Fixes: 930914b7d528fc6b0249bffc00564100bcf6ef75 ("powerpc/xive: Add a debugfs file to dump internal XIVE state")
Signed-off-by: Ammar Faizi <ammarfaizi2@gmail.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20211226135314.251221-1-ammar.faizi@intel.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/sysdev/xive/spapr.c