summaryrefslogtreecommitdiffstats
path: root/drivers/thermal
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2021-08-10 11:44:13 +0300
committerDaniel Lezcano <daniel.lezcano@linaro.org>2021-08-14 12:40:35 +0200
commit02d438f62c05f0d055ceeedf12a2f8796b258c08 (patch)
treea9a2397f1bc5b0027230ab642a4fedb0e78e6a4b /drivers/thermal
parent8f8d8b0334cc4e7908b78e73936a7673bbef0411 (diff)
downloadlinux-02d438f62c05f0d055ceeedf12a2f8796b258c08.tar.bz2
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: 6c247393cfdd ("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
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/samsung/exynos_tmu.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
index e9a90bc23b11..f4ab4c5b4b62 100644
--- a/drivers/thermal/samsung/exynos_tmu.c
+++ b/drivers/thermal/samsung/exynos_tmu.c
@@ -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);