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 <linux@roeck-us.net>
return err;
err = -ENODEV;
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:
switch (chip_type) {
case IT8705F_DEVID: