powerpc/powernv: add NULL check after kzalloc
authorChen Zhou <chenzhou10@huawei.com>
Sat, 9 May 2020 02:08:38 +0000 (10:08 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Jun 2020 15:48:52 +0000 (17:48 +0200)
commit38b682916f26be3a8a569cfaa8d9684198ab2969
treedcd814c64ad27151e16544e1f64e0d0bac6138c6
parent24f523946a1252ecef8cd404535912236ae5ef72
powerpc/powernv: add NULL check after kzalloc

[ Upstream commit ceffa63acce7165c442395b7d64a11ab8b5c5dca ]

Fixes coccicheck warning:

./arch/powerpc/platforms/powernv/opal.c:813:1-5:
alloc with no test, possible model on line 814

Add NULL check after kzalloc.

Signed-off-by: Chen Zhou <chenzhou10@huawei.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200509020838.121660-1-chenzhou10@huawei.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/platforms/powernv/opal.c