From 93d58d34ac5d5907624ac1033d0da67d36823269 Mon Sep 17 00:00:00 2001 From: Guenter Roeck Date: Tue, 14 Mar 2017 09:33:52 -0700 Subject: [PATCH] Force chip ID only if a chip has been found If the reported chip ID is 0xffff, there is no chip, and forcing the chip type does not add value. Signed-off-by: Guenter Roeck --- it87.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/it87.c b/it87.c index 850f176..5a96c5c 100644 --- a/it87.c +++ b/it87.c @@ -2421,7 +2421,12 @@ static int __init it87_find(int sioaddr, unsigned short *address, return err; err = -ENODEV; - chip_type = force_id ? force_id : superio_inw(sioaddr, DEVID); + chip_type = superio_inw(sioaddr, DEVID); + if (chip_type == 0xffff) + goto exit; + + if (force_id) + chip_type = force_id; switch (chip_type) { case IT8705F_DEVID: -- 2.39.5