Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7fc1e5c1 authored by Roel Kluin's avatar Roel Kluin Committed by Paul Mundt
Browse files

sh: clkfwk: beyond ARRAY_SIZE of onchip_ops for sh7722.



Do not go beyond ARRAY_SIZE of onchip_ops

Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent 30cff215
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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];
}