]> git.karo-electronics.de Git - linux-beck.git/commitdiff
thermal: exynos: Correct sanity check at exynos_report_trigger() function
authorLukasz Majewski <l.majewski@samsung.com>
Wed, 28 Jan 2015 15:25:22 +0000 (16:25 +0100)
committerEduardo Valentin <edubezval@gmail.com>
Wed, 28 Jan 2015 05:29:02 +0000 (01:29 -0400)
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>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
drivers/thermal/samsung/exynos_tmu.c

index 864eec8f5164f0c6291ba7d1db044920f4729faf..b6a6e90ba340739c9764b6fe97ad2389236425ff 100644 (file)
@@ -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;
        }