thermal/drivers/exynos: Fix an error code in exynos_tmu_probe()

This error path return success but it should propagate the negative
error code from devm_clk_get().

Fixes: 6c247393cf ("thermal: exynos: Add TMU support for Exynos7 SoC")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20210810084413.GA23810@kili
This commit is contained in:
Dan Carpenter 2021-08-10 11:44:13 +03:00 committed by Daniel Lezcano
parent 8f8d8b0334
commit 02d438f62c
1 changed files with 1 additions and 0 deletions

View File

@ -1073,6 +1073,7 @@ static int exynos_tmu_probe(struct platform_device *pdev)
data->sclk = devm_clk_get(&pdev->dev, "tmu_sclk");
if (IS_ERR(data->sclk)) {
dev_err(&pdev->dev, "Failed to get sclk\n");
ret = PTR_ERR(data->sclk);
goto err_clk;
} else {
ret = clk_prepare_enable(data->sclk);