summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@chromium.org>2016-08-01 15:56:09 +0200
committerPatrick Georgi <pgeorgi@google.com>2016-08-02 14:02:59 +0200
commit48e0792e4ae8d4267dc2d5fb6af3b2c079a4f61f (patch)
tree6c5784a7a630aacc228380e160d0114904f109c6 /src
parent47f7b0e196baa5b21820e8b7f91af18459e27813 (diff)
downloadcoreboot-48e0792e4ae8d4267dc2d5fb6af3b2c079a4f61f.tar.xz
i2c/w83795: Fix chip type message
(val & 4) == 1 is always false. Since val & 4 is either zero or non-zero, just drop the second test (for "== 1"). Validated against the data sheet that this is really the right register, bit and value. Change-Id: I627df9a9b4fddfff486689e405f52a3b54135eef Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Found-by: Coverity Scan #1241864 Reviewed-on: https://review.coreboot.org/16009 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'src')
-rw-r--r--src/drivers/i2c/w83795/w83795.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/drivers/i2c/w83795/w83795.c b/src/drivers/i2c/w83795/w83795.c
index 24da12c06a..02b7c375a6 100644
--- a/src/drivers/i2c/w83795/w83795.c
+++ b/src/drivers/i2c/w83795/w83795.c
@@ -160,7 +160,7 @@ static void w83795_init(struct device *dev, w83795_fan_mode_t mode, u8 dts_src)
val = w83795_read(dev, W83795_REG_CONFIG);
if ((val & W83795_REG_CONFIG_CONFIG48) == 0)
printk(BIOS_INFO, "Found 64 pin W83795G Nuvoton H/W Monitor\n");
- else if ((val & W83795_REG_CONFIG_CONFIG48) == 1)
+ else
printk(BIOS_INFO, "Found 48 pin W83795ADG Nuvoton H/W Monitor\n");
/* Reset */