public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] drivers/clk/clk: check return value of clk_pm_runtime_get()
@ 2022-09-03 22:41 Li Zhong
  2022-09-30  0:27 ` Stephen Boyd
  0 siblings, 1 reply; 2+ messages in thread
From: Li Zhong @ 2022-09-03 22:41 UTC (permalink / raw)
  To: linux-kernel, linux-clk; +Cc: mturquette, sboyd, Li Zhong

clk_pm_runtime_get() could fail. Check the return status.

Signed-off-by: Li Zhong <floridsleeves@gmail.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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-30  0:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-03 22:41 [PATCH v2] drivers/clk/clk: check return value of clk_pm_runtime_get() Li Zhong
2022-09-30  0:27 ` Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox