Commit bfa26838 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Eduardo Valentin

thermal: exynos: Use IS_ERR() because regulator cannot be NULL

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: default avatarAlim Akhtar <alim.akhtar@samsung.com>
Acked-by: default avatarLukasz Majewski <l.majewski@samsung.com>
Tested-by: default avatarLukasz Majewski <l.majewski@samsung.com>
Signed-off-by: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
parent 9e4249b4
...@@ -1396,7 +1396,7 @@ static int exynos_tmu_probe(struct platform_device *pdev) ...@@ -1396,7 +1396,7 @@ static int exynos_tmu_probe(struct platform_device *pdev)
if (!IS_ERR(data->clk_sec)) if (!IS_ERR(data->clk_sec))
clk_unprepare(data->clk_sec); clk_unprepare(data->clk_sec);
err_sensor: err_sensor:
if (!IS_ERR_OR_NULL(data->regulator)) if (!IS_ERR(data->regulator))
regulator_disable(data->regulator); regulator_disable(data->regulator);
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment