drivers/clk/clk: check return value of clk_pm_runtime_get()
PATCH v2 1/1 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 <[email protected]>
--- drivers/clk/clk.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/clk/clk.c +5 -1
@@ -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);
Signature · 1 line
2.25.1
Stephen Boyd
maintainerQuoting Li Zhong (2022-09-03 15:41:25)
Quoted 12 lines
clk_pm_runtime_get()could fail. Check the return status.Signed-off-by Li Zhong <[email protected]>--- drivers/clk/clk.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)drivers/clk/clk.c +0
-0
drivers/clk/clk.c static void clk_summary_show_subtree(struct seq_file *s, struct clk_core *c, · line 2985
Quoted 10 lines
drivers/clk/clk.c +5
-1@@ -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);
The patch is malformed. It can't be applied, sorry. Also, shouldn't we print something if we can't runtime PM get?
Quoted 3 lines
drivers/clk/clk.c +0
-0clk_summary_show_one (s, c, level);clk_pm_runtime_put (c);