diff --git a/drivers/thermal/intel/intel_pch_thermal.c b/drivers/thermal/intel/intel_pch_thermal.c index cc4e9d28496b5f8d4aee29c5fc9f6e864eeed913..45a9ea86907e943839b2617c5ddecca3fec1deb2 100644 --- a/drivers/thermal/intel/intel_pch_thermal.c +++ b/drivers/thermal/intel/intel_pch_thermal.c @@ -107,7 +107,7 @@ static void pch_wpt_add_acpi_psv_trip(struct pch_thermal_device *ptd, return; ret = thermal_acpi_trip_passive(adev, &ptd->trips[*nr_trips]); - if (ret) + if (ret || ptd->trips[*nr_trips].temperature <= 0) return; ++(*nr_trips); diff --git a/drivers/thermal/thermal_acpi.c b/drivers/thermal/thermal_acpi.c index f65281ca3ed0f4936ed0f42eea0b526775a4b34b..671f774a76219c601489f42d30e63c6ce8f3f2c9 100644 --- a/drivers/thermal/thermal_acpi.c +++ b/drivers/thermal/thermal_acpi.c @@ -64,13 +64,14 @@ static int thermal_acpi_trip_init(struct acpi_device *adev, return -ENODATA; } - if (temp < TEMP_MIN_DECIK || temp >= TEMP_MAX_DECIK) { + if (temp >= TEMP_MIN_DECIK && temp <= TEMP_MAX_DECIK) { + trip->temperature = deci_kelvin_to_millicelsius(temp); + } else { acpi_handle_debug(adev->handle, "%s result %llu out of range\n", obj_name, temp); - return -ENODATA; + trip->temperature = THERMAL_TEMP_INVALID; } - trip->temperature = deci_kelvin_to_millicelsius(temp); trip->hysteresis = 0; trip->type = type;