Skip to content

Commit

Permalink
sh: clkfwk: beyond ARRAY_SIZE of onchip_ops for sh7722.
Browse files Browse the repository at this point in the history
Do not go beyond ARRAY_SIZE of onchip_ops

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Roel Kluin authored and Paul Mundt committed May 22, 2009
1 parent 30cff21 commit 7fc1e5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/sh/kernel/cpu/sh4a/clock-sh7722.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}

Expand Down

0 comments on commit 7fc1e5c

Please sign in to comment.