From: Sasha Levin <sashal@kernel.org> To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Qinglang Miao <miaoqinglang@huawei.com>, Thierry Reding <treding@nvidia.com>, Sasha Levin <sashal@kernel.org>, dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org Subject: [PATCH AUTOSEL 5.4 03/14] drm/tegra: sor: Disable clocks on error in tegra_sor_init() Date: Sat, 12 Dec 2020 11:08:20 -0500 [thread overview] Message-ID: <20201212160831.2335172-3-sashal@kernel.org> (raw) In-Reply-To: <20201212160831.2335172-1-sashal@kernel.org> From: Qinglang Miao <miaoqinglang@huawei.com> [ Upstream commit bf3a3cdcad40e5928a22ea0fd200d17fd6d6308d ] Fix the missing clk_disable_unprepare() before return from tegra_sor_init() in the error handling case. Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com> Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Sasha Levin <sashal@kernel.org> --- drivers/gpu/drm/tegra/sor.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c index 75e65d9536d54..6c3d221652393 100644 --- a/drivers/gpu/drm/tegra/sor.c +++ b/drivers/gpu/drm/tegra/sor.c @@ -2899,6 +2899,7 @@ static int tegra_sor_init(struct host1x_client *client) if (err < 0) { dev_err(sor->dev, "failed to deassert SOR reset: %d\n", err); + clk_disable_unprepare(sor->clk); return err; } @@ -2906,12 +2907,17 @@ static int tegra_sor_init(struct host1x_client *client) } err = clk_prepare_enable(sor->clk_safe); - if (err < 0) + if (err < 0) { + clk_disable_unprepare(sor->clk); return err; + } err = clk_prepare_enable(sor->clk_dp); - if (err < 0) + if (err < 0) { + clk_disable_unprepare(sor->clk_safe); + clk_disable_unprepare(sor->clk); return err; + } /* * Enable and unmask the HDA codec SCRATCH0 register interrupt. This -- 2.27.0
WARNING: multiple messages have this Message-ID (diff)
From: Sasha Levin <sashal@kernel.org> To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Sasha Levin <sashal@kernel.org>, linux-tegra@vger.kernel.org, Thierry Reding <treding@nvidia.com>, dri-devel@lists.freedesktop.org, Qinglang Miao <miaoqinglang@huawei.com> Subject: [PATCH AUTOSEL 5.4 03/14] drm/tegra: sor: Disable clocks on error in tegra_sor_init() Date: Sat, 12 Dec 2020 11:08:20 -0500 [thread overview] Message-ID: <20201212160831.2335172-3-sashal@kernel.org> (raw) In-Reply-To: <20201212160831.2335172-1-sashal@kernel.org> From: Qinglang Miao <miaoqinglang@huawei.com> [ Upstream commit bf3a3cdcad40e5928a22ea0fd200d17fd6d6308d ] Fix the missing clk_disable_unprepare() before return from tegra_sor_init() in the error handling case. Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com> Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Sasha Levin <sashal@kernel.org> --- drivers/gpu/drm/tegra/sor.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c index 75e65d9536d54..6c3d221652393 100644 --- a/drivers/gpu/drm/tegra/sor.c +++ b/drivers/gpu/drm/tegra/sor.c @@ -2899,6 +2899,7 @@ static int tegra_sor_init(struct host1x_client *client) if (err < 0) { dev_err(sor->dev, "failed to deassert SOR reset: %d\n", err); + clk_disable_unprepare(sor->clk); return err; } @@ -2906,12 +2907,17 @@ static int tegra_sor_init(struct host1x_client *client) } err = clk_prepare_enable(sor->clk_safe); - if (err < 0) + if (err < 0) { + clk_disable_unprepare(sor->clk); return err; + } err = clk_prepare_enable(sor->clk_dp); - if (err < 0) + if (err < 0) { + clk_disable_unprepare(sor->clk_safe); + clk_disable_unprepare(sor->clk); return err; + } /* * Enable and unmask the HDA codec SCRATCH0 register interrupt. This -- 2.27.0 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2020-12-12 16:28 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-12-12 16:08 [PATCH AUTOSEL 5.4 01/14] drm/tegra: replace idr_init() by idr_init_base() Sasha Levin 2020-12-12 16:08 ` Sasha Levin 2020-12-12 16:08 ` [PATCH AUTOSEL 5.4 02/14] kernel/cpu: add arch override for clear_tasks_mm_cpumask() mm handling Sasha Levin 2020-12-12 16:08 ` Sasha Levin [this message] 2020-12-12 16:08 ` [PATCH AUTOSEL 5.4 03/14] drm/tegra: sor: Disable clocks on error in tegra_sor_init() Sasha Levin 2020-12-12 16:08 ` [PATCH AUTOSEL 5.4 04/14] habanalabs: put devices before driver removal Sasha Levin 2020-12-12 16:08 ` [PATCH AUTOSEL 5.4 05/14] arm64: syscall: exit userspace before unmasking exceptions Sasha Levin 2020-12-12 16:08 ` Sasha Levin 2020-12-12 16:08 ` [PATCH AUTOSEL 5.4 06/14] vxlan: Add needed_headroom for lower device Sasha Levin 2020-12-12 16:08 ` [PATCH AUTOSEL 5.4 07/14] vxlan: Copy needed_tailroom from lowerdev Sasha Levin 2020-12-12 16:08 ` [PATCH AUTOSEL 5.4 08/14] scsi: storvsc: Validate length of incoming packet in storvsc_on_channel_callback() Sasha Levin 2020-12-12 16:08 ` Sasha Levin 2020-12-12 16:08 ` [PATCH AUTOSEL 5.4 09/14] scsi: mpt3sas: Increase IOCInit request timeout to 30s Sasha Levin 2020-12-12 16:08 ` [PATCH AUTOSEL 5.4 10/14] dm table: Remove BUG_ON(in_interrupt()) Sasha Levin 2020-12-12 16:08 ` [dm-devel] " Sasha Levin 2020-12-12 16:08 ` [PATCH AUTOSEL 5.4 11/14] iwlwifi: pcie: add one missing entry for AX210 Sasha Levin 2020-12-12 16:08 ` [PATCH AUTOSEL 5.4 12/14] drm/amd/display: Init clock value by current vbios CLKs Sasha Levin 2020-12-12 16:08 ` Sasha Levin 2020-12-12 16:08 ` [PATCH AUTOSEL 5.4 13/14] perf/x86/intel: Check PEBS status correctly Sasha Levin 2020-12-12 16:08 ` [PATCH AUTOSEL 5.4 14/14] kbuild: avoid split lines in .mod files Sasha Levin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20201212160831.2335172-3-sashal@kernel.org \ --to=sashal@kernel.org \ --cc=dri-devel@lists.freedesktop.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-tegra@vger.kernel.org \ --cc=miaoqinglang@huawei.com \ --cc=stable@vger.kernel.org \ --cc=treding@nvidia.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.