diff options
author | Peiwei Hu <[email protected]> | 2021-11-19 17:12:18 +0800 |
---|---|---|
committer | Michael Ellerman <[email protected]> | 2021-11-25 11:25:33 +1100 |
commit | 869fb7e5aecbc163003f93f36dcc26d0554319f6 (patch) | |
tree | b6cc48a5318097b107c0d6c7d806042e00f8c183 | |
parent | dd5cde457a5eb77088d1d9eecface47c0563cd43 (diff) |
powerpc/prom_init: Fix improper check of prom_getprop()
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 <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
-rw-r--r-- | arch/powerpc/kernel/prom_init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index 18b04b08b983..f845065c860e 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c @@ -2991,7 +2991,7 @@ static void __init fixup_device_tree_efika_add_phy(void) /* Check if the phy-handle property exists - bail if it does */ rv = prom_getprop(node, "phy-handle", prop, sizeof(prop)); - if (!rv) + if (rv <= 0) return; /* |