From: Mingwei Zheng <zmw12306@gmail.com>
To: edubezval@gmail.com, j-keerthy@ti.com, rafael@kernel.org,
daniel.lezcano@linaro.org, rui.zhang@intel.com,
lukasz.luba@arm.com, aford173@gmail.com
Cc: linux-pm@vger.kernel.org, linux-omap@vger.kernel.org,
linux-kernel@vger.kernel.org, Mingwei Zheng <zmw12306@gmail.com>,
Jiasheng Jiang <jiashengjiangcool@gmail.com>
Subject: [PATCH] thermal: ti-soc-thermal: Add check for clk_enable()
Date: Fri, 6 Dec 2024 23:07:02 -0500 [thread overview]
Message-ID: <20241207040702.4075128-1-zmw12306@gmail.com> (raw)
Add check for the return value of clk_enable() to catch the potential
error.
Fixes: 5093402e5b44 ("thermal: ti-soc-thermal: Enable addition power management")
Signed-off-by: Mingwei Zheng <zmw12306@gmail.com>
Signed-off-by: Jiasheng Jiang <jiashengjiangcool@gmail.com>
---
drivers/thermal/ti-soc-thermal/ti-bandgap.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/thermal/ti-soc-thermal/ti-bandgap.c b/drivers/thermal/ti-soc-thermal/ti-bandgap.c
index ba43399d0b38..da3e5dec8709 100644
--- a/drivers/thermal/ti-soc-thermal/ti-bandgap.c
+++ b/drivers/thermal/ti-soc-thermal/ti-bandgap.c
@@ -1189,6 +1189,7 @@ static int bandgap_omap_cpu_notifier(struct notifier_block *nb,
unsigned long cmd, void *v)
{
struct ti_bandgap *bgp;
+ int ret;
bgp = container_of(nb, struct ti_bandgap, nb);
@@ -1206,8 +1207,11 @@ static int bandgap_omap_cpu_notifier(struct notifier_block *nb,
case CPU_CLUSTER_PM_EXIT:
if (bgp->is_suspended)
break;
- if (TI_BANDGAP_HAS(bgp, CLK_CTRL))
- clk_enable(bgp->fclock);
+ if (TI_BANDGAP_HAS(bgp, CLK_CTRL)) {
+ ret = clk_enable(bgp->fclock);
+ if (ret)
+ return NOTIFY_BAD;
+ }
ti_bandgap_power(bgp, true);
ti_bandgap_restore_ctxt(bgp);
break;
--
2.34.1
reply other threads:[~2024-12-07 4:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20241207040702.4075128-1-zmw12306@gmail.com \
--to=zmw12306@gmail.com \
--cc=aford173@gmail.com \
--cc=daniel.lezcano@linaro.org \
--cc=edubezval@gmail.com \
--cc=j-keerthy@ti.com \
--cc=jiashengjiangcool@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=rafael@kernel.org \
--cc=rui.zhang@intel.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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®