powerpc/prom_init: Fix improper check of prom_getprop()
authorPeiwei Hu <jlu.hpw@foxmail.com>
Fri, 19 Nov 2021 09:12:18 +0000 (17:12 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 10:04:06 +0000 (11:04 +0100)
commit49a237c73a78bebf7d683ce4b3159e07bf6b786e
treeb4d9084177462236287376b751555c19d1398183
parente459a89df303944c918cf57bc8a22bb1b4674846
powerpc/prom_init: Fix improper check of prom_getprop()

[ Upstream commit 869fb7e5aecbc163003f93f36dcc26d0554319f6 ]

prom_getprop() can return PROM_ERROR. Binary operator can not identify
it.

Fixes: 94d2dde738a5 ("[POWERPC] Efika: prune fixups and make them more carefull")
Signed-off-by: Peiwei Hu <jlu.hpw@foxmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/tencent_BA28CC6897B7C95A92EB8C580B5D18589105@qq.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/kernel/prom_init.c