From ce0c5334a012230faf08fc3b901bb12010eb0208 Mon Sep 17 00:00:00 2001 From: Jacob Garber Date: Thu, 13 Jun 2019 11:57:35 -0600 Subject: sb/amd/cimx/sb900: Change logical negation to bitwise MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Found-by: Coverity CID 1241812 Reviewed-on: https://review.coreboot.org/c/coreboot/+/33454 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki Reviewed-by: Marshall Dawson --- src/southbridge/amd/cimx/sb900/early.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/southbridge/amd/cimx/sb900/early.c b/src/southbridge/amd/cimx/sb900/early.c index 5ebe47e5fb..1aa9a5a4ba 100644 --- a/src/southbridge/amd/cimx/sb900/early.c +++ b/src/southbridge/amd/cimx/sb900/early.c @@ -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; } -- cgit v1.2.3