thermal: exynos: Use IS_ERR() because regulator cannot be NULL
authorKrzysztof Kozlowski <k.kozlowski@samsung.com>
Thu, 8 Oct 2015 05:34:04 +0000 (14:34 +0900)
committerEduardo Valentin <edubezval@gmail.com>
Wed, 4 Nov 2015 19:09:39 +0000 (11:09 -0800)
The NULL check in probe's error path is not needed because in that time
the regulator cannot be NULL (regulator_get() returns valid pointer or
ERR_PTR).

Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Tested-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
drivers/thermal/samsung/exynos_tmu.c

index bc71a61f0c4a1cd3262bab781a79760df159a585..eac6aebf82f39fed6333498e3ad146a4029258b9 100644 (file)
@@ -1396,7 +1396,7 @@ err_clk_sec:
        if (!IS_ERR(data->clk_sec))
                clk_unprepare(data->clk_sec);
 err_sensor:
-       if (!IS_ERR_OR_NULL(data->regulator))
+       if (!IS_ERR(data->regulator))
                regulator_disable(data->regulator);
 
        return ret;