linux-samsung-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] thermal: exynos: Fix an error code in exynos_tmu_probe()
@ 2021-08-10  8:44 Dan Carpenter
  2021-08-10  8:49 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2021-08-10  8:44 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz, Abhilash Kesavan
  Cc: Zhang Rui, Daniel Lezcano, Amit Kucheria, Krzysztof Kozlowski,
	Eduardo Valentin, Lukasz Majewski, linux-pm, linux-samsung-soc,
	linux-kernel, kernel-janitors

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>
---
 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-10  8:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-10  8:44 [PATCH] thermal: exynos: Fix an error code in exynos_tmu_probe() Dan Carpenter
2021-08-10  8:49 ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).