From: Guenter Roeck Date: Tue, 14 Mar 2017 16:33:52 +0000 (-0700) Subject: Force chip ID only if a chip has been found X-Git-Tag: v1.0~48 X-Git-Url: https://git.sur5r.net/?p=groeck-it87;a=commitdiff_plain;h=93d58d34ac5d5907624ac1033d0da67d36823269 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 --- 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: