From: Krzysztof Kozlowski Date: Thu, 8 Oct 2015 05:34:04 +0000 (+0900) Subject: thermal: exynos: Use IS_ERR() because regulator cannot be NULL X-Git-Tag: v4.4-rc1~38^2^3^2~2 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=bfa26838572cd9b2b0623fcbc7b9352dcaa4262b;p=linux.git 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 Acked-by: Lukasz Majewski Tested-by: Lukasz Majewski Signed-off-by: Krzysztof Kozlowski Signed-off-by: Eduardo Valentin --- 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 @@ static int exynos_tmu_probe(struct platform_device *pdev) 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;