]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
thermal/drivers/exynos: Fix an error code in exynos_tmu_probe()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 10 Aug 2021 08:44:13 +0000 (11:44 +0300)
committerKelsey Skunberg <kelsey.skunberg@canonical.com>
Wed, 27 Oct 2021 23:04:21 +0000 (17:04 -0600)
BugLink: https://bugs.launchpad.net/bugs/1947885
commit 02d438f62c05f0d055ceeedf12a2f8796b258c08 upstream.

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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/thermal/samsung/exynos_tmu.c

index fb2c55123a99ef06e1d589e4941d4c55eab7878e..059e3d1610c98a9bac127db85647aecb3b67356e 100644 (file)
@@ -1070,6 +1070,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);