sb/amd/cimx/sb900: Change logical negation to bitwise

data &= !BIT0 will clear data, since !BIT0 evaluates to 0 (oops). We
only want to clear bit 0, not the whole thing, so use bitwise negation
instead.

Change-Id: I2179119e0d2d4aceaf4f8b499bf4c5baf4ef677f
Signed-off-by: Jacob Garber <jgarber1@ualberta.ca>
Found-by: Coverity CID 1241812
Reviewed-on: https://review.coreboot.org/c/coreboot/+/33454
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
This commit is contained in:
Jacob Garber 2019-06-13 11:57:35 -06:00 committed by Martin Roth
parent 7407210a67
commit ce0c5334a0
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ void sb_poweron_init(void)
//Enable/Disable PCI Bridge Device 14 Function 4.
outb(0xEA, 0xCD6);
data = inb(0xCD7);
data &= !BIT0;
data &= ~BIT0;
if (!CONFIG(PCIB_ENABLE)) {
data |= BIT0;
}