diff options
author | Krzysztof Kozlowski <k.kozlowski@samsung.com> | 2015-10-08 01:34:04 -0400 |
---|---|---|
committer | Eduardo Valentin <edubezval@gmail.com> | 2015-11-04 14:09:39 -0500 |
commit | bfa26838572cd9b2b0623fcbc7b9352dcaa4262b (patch) | |
tree | 3cff7e097ccdd351faf24fef902f477901f11c08 | |
parent | 9e4249b4034090730017deaf632b46b5faaa12b9 (diff) |
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: 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>
-rw-r--r-- | drivers/thermal/samsung/exynos_tmu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index bc71a61f0c4a..eac6aebf82f3 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c | |||
@@ -1396,7 +1396,7 @@ err_clk_sec: | |||
1396 | if (!IS_ERR(data->clk_sec)) | 1396 | if (!IS_ERR(data->clk_sec)) |
1397 | clk_unprepare(data->clk_sec); | 1397 | clk_unprepare(data->clk_sec); |
1398 | err_sensor: | 1398 | err_sensor: |
1399 | if (!IS_ERR_OR_NULL(data->regulator)) | 1399 | if (!IS_ERR(data->regulator)) |
1400 | regulator_disable(data->regulator); | 1400 | regulator_disable(data->regulator); |
1401 | 1401 | ||
1402 | return ret; | 1402 | return ret; |