sh: clkfwk: beyond ARRAY_SIZE of onchip_ops for sh7722.
authorRoel Kluin <roel.kluin@gmail.com>
Thu, 21 May 2009 18:25:23 +0000 (18:25 +0000)
committerPaul Mundt <lethal@linux-sh.org>
Fri, 22 May 2009 03:58:02 +0000 (12:58 +0900)
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>
arch/sh/kernel/cpu/sh4a/clock-sh7722.c

index ae78efd0582dcc9a9e49a6a3a32fdda440fb136e..c090c9a373f661379d714371c3000c6ade3326b8 100644 (file)
@@ -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];
 }
 
This page took 0.028773 seconds and 5 git commands to generate.