summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/clk/versatile/clk-sp810.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/clk/versatile/clk-sp810.c')
-rw-r--r--kernel/drivers/clk/versatile/clk-sp810.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/drivers/clk/versatile/clk-sp810.c b/kernel/drivers/clk/versatile/clk-sp810.c
index c6e86a9a2..5122ef25f 100644
--- a/kernel/drivers/clk/versatile/clk-sp810.c
+++ b/kernel/drivers/clk/versatile/clk-sp810.c
@@ -128,8 +128,8 @@ static struct clk *clk_sp810_timerclken_of_get(struct of_phandle_args *clkspec,
{
struct clk_sp810 *sp810 = data;
- if (WARN_ON(clkspec->args_count != 1 || clkspec->args[0] >
- ARRAY_SIZE(sp810->timerclken)))
+ if (WARN_ON(clkspec->args_count != 1 ||
+ clkspec->args[0] >= ARRAY_SIZE(sp810->timerclken)))
return NULL;
return sp810->timerclken[clkspec->args[0]].clk;