All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] thermal: exynos: Correct sanity check at exynos_report_trigger() function
@ 2015-01-28 15:25 Lukasz Majewski
  0 siblings, 0 replies; only message in thread
From: Lukasz Majewski @ 2015-01-28 15:25 UTC (permalink / raw)
  To: Eduardo Valentin, Dan Carpenter
  Cc: Zhang Rui, Linux PM list, linux-samsung-soc,
	Bartlomiej Zolnierkiewicz, Lukasz Majewski, Kukjin Kim,
	Amit Daniel Kachhap, Abhilash Kesavan, Abhilash Kesavan,
	Kukjin Kim, Chanwoo Choi, Lukasz Majewski

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@oracle.com>
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
---
 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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-01-29  1:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-28 15:25 [PATCH] thermal: exynos: Correct sanity check at exynos_report_trigger() function Lukasz Majewski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.