[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220903224125.2276690-1-floridsleeves@gmail.com>
Date: Sat, 3 Sep 2022 15:41:25 -0700
From: Li Zhong <floridsleeves@...il.com>
To: linux-kernel@...r.kernel.org, linux-clk@...r.kernel.org
Cc: mturquette@...libre.com, sboyd@...nel.org,
Li Zhong <floridsleeves@...il.com>
Subject: [PATCH v2] drivers/clk/clk: check return value of clk_pm_runtime_get()
clk_pm_runtime_get() could fail. Check the return status.
Signed-off-by: Li Zhong <floridsleeves@...il.com>
---
drivers/clk/clk.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 7fc191c15507..09353f7bf052 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -2981,8 +2981,12 @@ static void clk_summary_show_subtree(struct seq_file *s, struct clk_core *c,
int level)
{
struct clk_core *child;
+ int ret;
+
+ ret = clk_pm_runtime_get(c);
+ if (ret)
+ return;
- clk_pm_runtime_get(c);
clk_summary_show_one(s, c, level);
clk_pm_runtime_put(c);
--
2.25.1
Powered by blists - more mailing lists