Skip to contentSkip to conversation

thermal: exynos: Correct sanity check at exynos_report_trigger() function

PATCH New Lukasz Majewski 1 participant 1 message Jan 28, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 thermal: exynos: Correct sanity check at exynos_report_trigger() function

Up till now, by mistake, wrong variable was tested against being NULL. Since exynos_report_trigger() is always called with valid p pointer, it is only necessary to check if a valid thermal zone device is passed.

---
 drivers/thermal/samsung/exynos_tmu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/thermal/samsung/exynos_tmu.c +2 -2
index 852e622..178de03 100644
@@ -172,8 +172,8 @@ static void exynos_report_trigger(struct exynos_tmu_data *p)
 	unsigned long temp;
 	unsigned int i;
 
-	if (!p) {
-		pr_err("Wrong temperature configuration data\n");
+	if (!tz) {
+		pr_err("No thermal zone device defined\n");
 		return;
 	}
 
Signature · 1 line
2.0.0.rc2