linux-pm.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
  2021-09-09 14:38 ` [thermal: thermal/next] thermal/drivers/exynos: " thermal-bot for Dan Carpenter
  0 siblings, 2 replies; 3+ 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 related	[flat|nested] 3+ messages in thread

* Re: [PATCH] thermal: exynos: Fix an error code in exynos_tmu_probe()
  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
  2021-09-09 14:38 ` [thermal: thermal/next] thermal/drivers/exynos: " thermal-bot for Dan Carpenter
  1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2021-08-10  8:49 UTC (permalink / raw)
  To: Dan Carpenter, Bartlomiej Zolnierkiewicz, Abhilash Kesavan
  Cc: Zhang Rui, Daniel Lezcano, Amit Kucheria, Eduardo Valentin,
	Lukasz Majewski, linux-pm, linux-samsung-soc, linux-kernel,
	kernel-janitors

On 10/08/2021 10:44, Dan Carpenter wrote:
> 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(+)
> 

Thanks, good catch!

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>


Best regards,
Krzysztof

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

* [thermal: thermal/next] thermal/drivers/exynos: Fix an error code in exynos_tmu_probe()
  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
@ 2021-09-09 14:38 ` thermal-bot for Dan Carpenter
  1 sibling, 0 replies; 3+ messages in thread
From: thermal-bot for Dan Carpenter @ 2021-09-09 14:38 UTC (permalink / raw)
  To: linux-pm
  Cc: Dan Carpenter, Krzysztof Kozlowski, Daniel Lezcano, rui.zhang, amitk

The following commit has been merged into the thermal/next branch of thermal:

Commit-ID:     02d438f62c05f0d055ceeedf12a2f8796b258c08
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//02d438f62c05f0d055ceeedf12a2f8796b258c08
Author:        Dan Carpenter <dan.carpenter@oracle.com>
AuthorDate:    Tue, 10 Aug 2021 11:44:13 +03:00
Committer:     Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Sat, 14 Aug 2021 12:40:35 +02:00

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
---
 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 e9a90bc..f4ab4c5 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);

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

end of thread, other threads:[~2021-09-09 14:47 UTC | newest]

Thread overview: 3+ 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
2021-09-09 14:38 ` [thermal: thermal/next] thermal/drivers/exynos: " thermal-bot for Dan Carpenter

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