summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-09-26 14:22:00 +0200
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-09-27 23:17:54 +0100
commitd1d8f7dec179a421d6d449ddcd1713ed55db40be (patch)
tree46dff83ffc5618eb22b60add847434b7e03ada53 /arch
parent576b3ef2495c732a56509febd5de5144f3ebccf6 (diff)
downloadkernel-crypto-d1d8f7dec179a421d6d449ddcd1713ed55db40be.tar.gz
kernel-crypto-d1d8f7dec179a421d6d449ddcd1713ed55db40be.tar.xz
kernel-crypto-d1d8f7dec179a421d6d449ddcd1713ed55db40be.zip
[ARM] Off-by-one in arch/arm/common/icst*
hi, a quick find -iname \*.[ch] | xargs grep "> ARRAY_SIZE(", revealed these in the icst drivers. If i == ARRAY_SIZE, we get past the idx2s array. Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/common/icst307.c4
-rw-r--r--arch/arm/common/icst525.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/arch/arm/common/icst307.c b/arch/arm/common/icst307.c
index bafe8b19be8..6d094c15754 100644
--- a/arch/arm/common/icst307.c
+++ b/arch/arm/common/icst307.c
@@ -57,7 +57,7 @@ icst307_khz_to_vco(const struct icst307_params *p, unsigned long freq)
break;
} while (i < ARRAY_SIZE(idx2s));
- if (i > ARRAY_SIZE(idx2s))
+ if (i >= ARRAY_SIZE(idx2s))
return vco;
vco.s = idx2s[i];
@@ -119,7 +119,7 @@ icst307_ps_to_vco(const struct icst307_params *p, unsigned long period)
break;
} while (i < ARRAY_SIZE(idx2s));
- if (i > ARRAY_SIZE(idx2s))
+ if (i >= ARRAY_SIZE(idx2s))
return vco;
vco.s = idx2s[i];
diff --git a/arch/arm/common/icst525.c b/arch/arm/common/icst525.c
index 943ef88c037..3d377c5bdef 100644
--- a/arch/arm/common/icst525.c
+++ b/arch/arm/common/icst525.c
@@ -55,7 +55,7 @@ icst525_khz_to_vco(const struct icst525_params *p, unsigned long freq)
break;
} while (i < ARRAY_SIZE(idx2s));
- if (i > ARRAY_SIZE(idx2s))
+ if (i >= ARRAY_SIZE(idx2s))
return vco;
vco.s = idx2s[i];
@@ -118,7 +118,7 @@ icst525_ps_to_vco(const struct icst525_params *p, unsigned long period)
break;
} while (i < ARRAY_SIZE(idx2s));
- if (i > ARRAY_SIZE(idx2s))
+ if (i >= ARRAY_SIZE(idx2s))
return vco;
vco.s = idx2s[i];