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 <linux@roeck-us.net>
This commit is contained in:
7
it87.c
7
it87.c
@@ -2421,7 +2421,12 @@ static int __init it87_find(int sioaddr, unsigned short *address,
|
|||||||
return err;
|
return err;
|
||||||
|
|
||||||
err = -ENODEV;
|
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) {
|
switch (chip_type) {
|
||||||
case IT8705F_DEVID:
|
case IT8705F_DEVID:
|
||||||
|
Reference in New Issue
Block a user