[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210810084413.GA23810@kili>
Date: Tue, 10 Aug 2021 11:44:13 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
Abhilash Kesavan <a.kesavan@...sung.com>
Cc: Zhang Rui <rui.zhang@...el.com>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
Amit Kucheria <amitk@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>,
Eduardo Valentin <edubezval@...il.com>,
Lukasz Majewski <l.majewski@...sung.com>,
linux-pm@...r.kernel.org, linux-samsung-soc@...r.kernel.org,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: [PATCH] thermal: 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@...cle.com>
---
drivers/thermal/samsung/exynos_tmu.c | 1 +
1 file changed, 1 insertion(+)
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);
--
2.20.1
Powered by blists - more mailing lists