]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/tegra: Add missing clk_disable_unprepare() in tegra_dc_probe()
authorZhang Zekun <zhangzekun11@huawei.com>
Tue, 2 Aug 2022 08:50:50 +0000 (08:50 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:41:06 +0000 (11:41 +0100)
[ Upstream commit 7ad4384d53c67672a8720cdc2ef638d7d1710ab8 ]

Add the missing clk_disable_unprepare() before return from
tegra_dc_probe() in the error handling path.

Fixes: 07df08b35680 ("drm/tegra: dc: Link DC1 to DC0 on Tegra20")
Signed-off-by: Zhang Zekun <zhangzekun11@huawei.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/tegra/dc.c

index c410221824c1b09ee00377f359ef5fc03a67a083..923899b95c8811a64a1c58d0077d89dc8545b4be 100644 (file)
@@ -2458,8 +2458,10 @@ static int tegra_dc_probe(struct platform_device *pdev)
        usleep_range(2000, 4000);
 
        err = reset_control_assert(dc->rst);
-       if (err < 0)
+       if (err < 0) {
+               clk_disable_unprepare(dc->clk);
                return err;
+       }
 
        usleep_range(2000, 4000);