mirror of
https://github.com/torvalds/linux.git
synced 2026-06-06 05:27:07 +02:00
powerpc/prom_init: Fix improper check of prom_getprop()
[ Upstream commit869fb7e5ae] prom_getprop() can return PROM_ERROR. Binary operator can not identify it. Fixes:94d2dde738("[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>
This commit is contained in:
parent
9ca761ef94
commit
5a821af769
|
|
@ -2956,7 +2956,7 @@ static void __init fixup_device_tree_efika_add_phy(void)
|
||||||
|
|
||||||
/* Check if the phy-handle property exists - bail if it does */
|
/* Check if the phy-handle property exists - bail if it does */
|
||||||
rv = prom_getprop(node, "phy-handle", prop, sizeof(prop));
|
rv = prom_getprop(node, "phy-handle", prop, sizeof(prop));
|
||||||
if (!rv)
|
if (rv <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user