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>
This commit is contained in:
parent
47f7b0e196
commit
48e0792e4a
|
@ -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);
|
val = w83795_read(dev, W83795_REG_CONFIG);
|
||||||
if ((val & W83795_REG_CONFIG_CONFIG48) == 0)
|
if ((val & W83795_REG_CONFIG_CONFIG48) == 0)
|
||||||
printk(BIOS_INFO, "Found 64 pin W83795G Nuvoton H/W Monitor\n");
|
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");
|
printk(BIOS_INFO, "Found 48 pin W83795ADG Nuvoton H/W Monitor\n");
|
||||||
|
|
||||||
/* Reset */
|
/* Reset */
|
||||||
|
|
Loading…
Reference in New Issue