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>
This commit is contained in:
Elyes HAOUAS 2019-06-11 13:18:04 +02:00 committed by Nico Huber
parent d844431af0
commit a360d9a6bf
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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;