public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] thermal: core: ignore invalid trip temperature
@ 2014-11-12 23:43 Srinivas Pandruvada
  2014-11-13  9:23 ` Lukasz Majewski
  2014-11-20  2:25 ` Zhang Rui
  0 siblings, 2 replies; 7+ messages in thread
From: Srinivas Pandruvada @ 2014-11-12 23:43 UTC (permalink / raw)
  To: rui.zhang, edubezval; +Cc: linux-pm, Srinivas Pandruvada

Ignore invalid trip temperature less or equal to zero. Some
buggy systems have invalid trips, causing system shutdown.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Acked-by: Zhang Rui <rui.zhang@intel.com>
---
 drivers/thermal/thermal_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index 9bf10aa..fbf301a 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -368,7 +368,7 @@ static void handle_critical_trips(struct thermal_zone_device *tz,
 	tz->ops->get_trip_temp(tz, trip, &trip_temp);
 
 	/* If we have not crossed the trip_temp, we do not care. */
-	if (tz->temperature < trip_temp)
+	if (trip_temp <= 0 || tz->temperature < trip_temp)
 		return;
 
 	trace_thermal_zone_trip(tz, trip, trip_type);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-11-25  5:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-12 23:43 [PATCH] thermal: core: ignore invalid trip temperature Srinivas Pandruvada
2014-11-13  9:23 ` Lukasz Majewski
     [not found]   ` <1415892544.4581.17.camel@spandruv-hsb-test>
     [not found]     ` <20141114125054.64e93e5b@amdc2363>
2014-11-15 17:24       ` Srinivas Pandruvada
2014-11-20  2:25 ` Zhang Rui
2014-11-20 10:25   ` Lukasz Majewski
2014-11-20 17:13     ` Srinivas Pandruvada
2014-11-25  5:34     ` Zhang Rui

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox