[PATCH] thermal: exynos: Correct sanity check at exynos_report_trigger() function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Signed-off-by: Lukasz Majewski <l.majewski@xxxxxxxxxxx>
---
 drivers/thermal/samsung/exynos_tmu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
index 852e622..178de03 100644
--- a/drivers/thermal/samsung/exynos_tmu.c
+++ b/drivers/thermal/samsung/exynos_tmu.c
@@ -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;
 	}
 
-- 
2.0.0.rc2

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  Powered by Linux