thermal: exynos: Fix an error code in exynos_tmu_probe()
Subsystems (4)
PATCH 1/1 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 <[email protected]>
--- drivers/thermal/samsung/exynos_tmu.c | 1 + 1 file changed, 1 insertion(+)
drivers/thermal/samsung/exynos_tmu.c +1 -0
@@ -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);
Signature · 1 line
2.20.1
Quoted 9 lines · Dan Carpenter
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 <[email protected]>--- drivers/thermal/samsung/exynos_tmu.c | 1 + 1 file changed, 1 insertion(+)
Thanks, good catch!
Reviewed-by Krzysztof Kozlowski <[email protected]>
Best regards,
Krzysztof
[thermal: thermal/next] thermal/drivers/exynos: Fix an error code in exynos_tmu_probe()
In reply to Dan CarpenterThe following commit has been merged into the thermal/next branch of thermal:
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 <[email protected]> AuthorDate: Tue, 10 Aug 2021 11:44:13 +03:00 Committer: Daniel Lezcano <[email protected]> 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 <[email protected]>
Reviewed-by Krzysztof Kozlowski <[email protected]>
Signed-off-by Daniel Lezcano <[email protected]>
--- drivers/thermal/samsung/exynos_tmu.c | 1 + 1 file changed, 1 insertion(+)
drivers/thermal/samsung/exynos_tmu.c +1 -0
@@ -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);