summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElyes HAOUAS <ehaouas@noos.fr>2019-06-11 13:18:04 +0200
committerNico Huber <nico.h@gmx.de>2019-06-15 16:31:11 +0000
commita360d9a6bf6556a7e73c40f257e807a73964bb70 (patch)
tree44f7239ab0dd8c8701e0820ea819ed5f015f9a63
parentd844431af09aafd65656f77b699c737966b30086 (diff)
vendorcode/agesa/*/Proc/IDS/Library/IdsLib.c: Fix logical 'or' tests
"if (_pcidata != 0xFFFFFFFF || _pcidata != 0)", is always true. The right test should be && not ||. Error found using -Wlogical-op warning option. Change-Id: I537fa4867499e1e6e5f662086fabc99b91aa0c70 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/33392 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com>
-rw-r--r--src/vendorcode/amd/agesa/f15tn/Proc/IDS/Library/IdsLib.c2
-rw-r--r--src/vendorcode/amd/agesa/f16kb/Proc/IDS/Library/IdsLib.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/vendorcode/amd/agesa/f15tn/Proc/IDS/Library/IdsLib.c b/src/vendorcode/amd/agesa/f15tn/Proc/IDS/Library/IdsLib.c
index 34a12a78e6..046d1826aa 100644
--- a/src/vendorcode/amd/agesa/f15tn/Proc/IDS/Library/IdsLib.c
+++ b/src/vendorcode/amd/agesa/f15tn/Proc/IDS/Library/IdsLib.c
@@ -900,7 +900,7 @@ IdsCheckPciExisit (
_pciaddr = PciAddr;
_pciaddr.Address.Register = 0;
LibAmdPciRead (AccessWidth32, _pciaddr, &_pcidata, StdHeader);
- if (_pcidata != 0xFFFFFFFF || _pcidata != 0) {
+ if (_pcidata != 0xFFFFFFFF && _pcidata != 0) {
status = TRUE;
}
return status;
diff --git a/src/vendorcode/amd/agesa/f16kb/Proc/IDS/Library/IdsLib.c b/src/vendorcode/amd/agesa/f16kb/Proc/IDS/Library/IdsLib.c
index 0cb0a63680..b7a49b27f1 100644
--- a/src/vendorcode/amd/agesa/f16kb/Proc/IDS/Library/IdsLib.c
+++ b/src/vendorcode/amd/agesa/f16kb/Proc/IDS/Library/IdsLib.c
@@ -983,7 +983,7 @@ IdsCheckPciExisit (
_pciaddr = PciAddr;
_pciaddr.Address.Register = 0;
LibAmdPciRead (AccessWidth32, _pciaddr, &_pcidata, StdHeader);
- if (_pcidata != 0xFFFFFFFF || _pcidata != 0) {
+ if (_pcidata != 0xFFFFFFFF && _pcidata != 0) {
status = TRUE;
}
return status;