[coreboot-gerrit] New patch to review for coreboot: lenovo/x60: Fetch 16 bits when trying to parse bit 13

Patrick Georgi (pgeorgi@google.com) gerrit at coreboot.org
Tue Aug 2 14:29:45 CEST 2016


Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/16026

-gerrit

commit 78e31f1feb953d6a24749efd69c274f0aab22105
Author: Patrick Georgi <pgeorgi at chromium.org>
Date:   Tue Aug 2 14:28:49 2016 +0200

    lenovo/x60: Fetch 16 bits when trying to parse bit 13
    
    I'm not sure if that's the right fix here, but assuming the bit mask is
    right, the inb is wrong.
    
    Change-Id: I7e33019af088780a09be12513200bec63734bf97
    Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
    Found-by: Coverity Scan #1229556
---
 src/mainboard/lenovo/x60/dock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mainboard/lenovo/x60/dock.c b/src/mainboard/lenovo/x60/dock.c
index ca82d38..c2bed9a 100644
--- a/src/mainboard/lenovo/x60/dock.c
+++ b/src/mainboard/lenovo/x60/dock.c
@@ -255,7 +255,7 @@ void dock_disconnect(void)
 
 int dock_present(void)
 {
-	return !((inb(DEFAULT_GPIOBASE + 0x0c) >> 13) & 1);
+	return !((inw(DEFAULT_GPIOBASE + 0x0c) >> 13) & 1);
 }
 
 int dock_ultrabay_device_present(void)



More information about the coreboot-gerrit mailing list