hwmon: (drivetemp) Fix SCT support if SCT data tables are not supported
authorGuenter Roeck <linux@roeck-us.net>
Sat, 9 May 2020 20:13:33 +0000 (13:13 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Sat, 9 May 2020 20:22:34 +0000 (13:22 -0700)
If SCT is supported but SCT data tables are not, the driver unnecessarily
tries to fall back to SMART. Use SCT without data tables instead in this
situation.

Fixes: 5b46903d8bf3 ("hwmon: Driver for disk and solid state drives with temperature sensors")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/drivetemp.c

index 9179460c2d9d586e1358859a485234126aa7bc8c..0d4f3d97ffc61f8af1d4d4dff6c269353fcd5c9a 100644 (file)
@@ -346,7 +346,7 @@ static int drivetemp_identify_sata(struct drivetemp_data *st)
        st->have_temp_highest = temp_is_valid(buf[SCT_STATUS_TEMP_HIGHEST]);
 
        if (!have_sct_data_table)
-               goto skip_sct;
+               goto skip_sct_data;
 
        /* Request and read temperature history table */
        memset(buf, '\0', sizeof(st->smartdata));