From: Li Zhong <floridsleeves@gmail.com>
To: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: mturquette@baylibre.com, sboyd@kernel.org,
lily <floridsleeves@gmail.com>
Subject: [PATCH v1] drivers/clk/clk: check return value of clk_pm_runtime_get()
Date: Sun, 28 Aug 2022 13:20:25 -0700 [thread overview]
Message-ID: <20220828202025.1948848-1-floridsleeves@gmail.com> (raw)
From: lily <floridsleeves@gmail.com>
clk_pm_runtime_get() could fail. Check the return status.
Signed-off-by: Li Zhong <floridsleeves@gmail.com>
---
drivers/clk/clk.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 7fc191c15507..f22b86dfe2f2 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -2981,8 +2981,11 @@ static void clk_summary_show_subtree(struct seq_file *s, struct clk_core *c,
int level)
{
struct clk_core *child;
-
- clk_pm_runtime_get(c);
+ int ret;
+
+ ret = clk_pm_runtime_get(c);
+ if (ret)
+ return;
clk_summary_show_one(s, c, level);
clk_pm_runtime_put(c);
--
2.25.1
next reply other threads:[~2022-08-28 20:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-28 20:20 Li Zhong [this message]
2022-08-28 23:26 ` [PATCH v1] drivers/clk/clk: check return value of clk_pm_runtime_get() kernel test robot
2022-08-29 0:18 ` kernel test robot
2022-08-29 0:28 ` kernel test robot
2022-08-29 4:02 ` kernel test robot
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=20220828202025.1948848-1-floridsleeves@gmail.com \
--to=floridsleeves@gmail.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=sboyd@kernel.org \
/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