From 4764340c9836e815940f68acb8131ad267b6ca0a Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Tue, 2 Aug 2016 14:28:49 +0200 Subject: [PATCH] UPSTREAM: 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. BUG=None BRANCH=None TEST=None Signed-off-by: Patrick Georgi Found-by: Coverity Scan #1229556 Reviewed-on: https://review.coreboot.org/16026 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Alexander Couzens Change-Id: I7e33019af088780a09be12513200bec63734bf97 Reviewed-on: https://chromium-review.googlesource.com/368029 Commit-Ready: Furquan Shaikh Tested-by: Furquan Shaikh Reviewed-by: Aaron Durbin --- 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 ca82d388ab..c2bed9a087 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)