提交 a70c6e06 编写于 作者: J Jerome Brunet

clk: meson: gxbb: protect against holes in the onecell_data array

The clock controller is getting more complex and it might be possible, in
the future, to have holes in the clk_hw_onecell_data array. Just make sure
we skip those holes if it ever happens.
Acked-by: NMichael Turquette <mturquette@baylibre.com>
Signed-off-by: NJerome Brunet <jbrunet@baylibre.com>
上级 fd33f3ec
......@@ -1388,6 +1388,10 @@ static int gxbb_clkc_probe(struct platform_device *pdev)
* register all clks
*/
for (clkid = 0; clkid < clkc_data->hw_onecell_data->num; clkid++) {
/* array might be sparse */
if (!clkc_data->hw_onecell_data->hws[clkid])
continue;
ret = devm_clk_hw_register(dev,
clkc_data->hw_onecell_data->hws[clkid]);
if (ret)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部