Commit 26f6b0b7 authored by Shawn Guo's avatar Shawn Guo Committed by Stephen Boyd

clk: zx296718: do not panic on failure

Instead of using panic, we should give an error message and return error
code when of_clk_add_hw_provider() call fails.

Since we have error prompt for failures, the "init over" pr_info output
isn't really necessary but becomes a debug noise.  So let's clean it up
along the way.
Signed-off-by: default avatarShawn Guo <shawn.guo@linaro.org>
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
parent ed784c53
...@@ -610,9 +610,12 @@ static int __init top_clocks_init(struct device_node *np) ...@@ -610,9 +610,12 @@ static int __init top_clocks_init(struct device_node *np)
} }
} }
if (of_clk_add_hw_provider(np, of_clk_hw_onecell_get, &top_hw_onecell_data)) ret = of_clk_add_hw_provider(np, of_clk_hw_onecell_get,
panic("could not register clk provider\n"); &top_hw_onecell_data);
pr_info("top clk init over, nr:%d\n", TOP_NR_CLKS); if (ret) {
pr_err("failed to register top clk provider: %d\n", ret);
return ret;
}
return 0; return 0;
} }
...@@ -776,9 +779,12 @@ static int __init lsp0_clocks_init(struct device_node *np) ...@@ -776,9 +779,12 @@ static int __init lsp0_clocks_init(struct device_node *np)
} }
} }
if (of_clk_add_hw_provider(np, of_clk_hw_onecell_get, &lsp0_hw_onecell_data)) ret = of_clk_add_hw_provider(np, of_clk_hw_onecell_get,
panic("could not register clk provider\n"); &lsp0_hw_onecell_data);
pr_info("lsp0-clk init over:%d\n", LSP0_NR_CLKS); if (ret) {
pr_err("failed to register lsp0 clk provider: %d\n", ret);
return ret;
}
return 0; return 0;
} }
...@@ -881,9 +887,12 @@ static int __init lsp1_clocks_init(struct device_node *np) ...@@ -881,9 +887,12 @@ static int __init lsp1_clocks_init(struct device_node *np)
} }
} }
if (of_clk_add_hw_provider(np, of_clk_hw_onecell_get, &lsp1_hw_onecell_data)) ret = of_clk_add_hw_provider(np, of_clk_hw_onecell_get,
panic("could not register clk provider\n"); &lsp1_hw_onecell_data);
pr_info("lsp1-clk init over, nr:%d\n", LSP1_NR_CLKS); if (ret) {
pr_err("failed to register lsp1 clk provider: %d\n", ret);
return ret;
}
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment