提交 7fc1e5c1 编写于 作者: R Roel Kluin 提交者: Paul Mundt

sh: clkfwk: beyond ARRAY_SIZE of onchip_ops for sh7722.

Do not go beyond ARRAY_SIZE of onchip_ops
Signed-off-by: NRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
上级 30cff215
......@@ -883,7 +883,7 @@ struct clk_ops *onchip_ops[] = {
void __init
arch_init_clk_ops(struct clk_ops **ops, int type)
{
BUG_ON(type < 0 || type > ARRAY_SIZE(onchip_ops));
BUG_ON(type < 0 || type >= ARRAY_SIZE(onchip_ops));
*ops = onchip_ops[type];
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册