diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2022-08-02 13:38:32 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-08-21 16:16:12 +0300 |
commit | cadeb5186e253ba9e44284423621090f1e2420e6 (patch) | |
tree | f06fa4b0b99d5f5e282b91ae4278098413deb504 /tools/perf/util/cloexec.c | |
parent | 2a49b025c36ae749cee7ccc4b7e456e02539cdc3 (diff) | |
download | linux-cadeb5186e253ba9e44284423621090f1e2420e6.tar.xz |
powerpc/pci: Fix PHB numbering when using opal-phbid
[ Upstream commit f4b39e88b42d13366b831270306326b5c20971ca ]
The recent change to the PHB numbering logic has a logic error in the
handling of "ibm,opal-phbid".
When an "ibm,opal-phbid" property is present, &prop is written to and
ret is set to zero.
The following call to of_alias_get_id() is skipped because ret == 0.
But then the if (ret >= 0) is true, and the body of that if statement
sets prop = ret which throws away the value that was just read from
"ibm,opal-phbid".
Fix the logic by only doing the ret >= 0 check in the of_alias_get_id()
case.
Fixes: 0fe1e96fef0a ("powerpc/pci: Prefer PCI domain assignment via DT 'linux,pci-domain' and alias")
Reviewed-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220802105723.1055178-1-mpe@ellerman.id.au
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools/perf/util/cloexec.c')
0 files changed, 0 insertions, 0 deletions