diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-09-26 08:22:00 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-09-27 18:17:54 -0400 |
commit | d1d8f7dec179a421d6d449ddcd1713ed55db40be (patch) | |
tree | 46dff83ffc5618eb22b60add847434b7e03ada53 /arch/arm/common/icst307.c | |
parent | 576b3ef2495c732a56509febd5de5144f3ebccf6 (diff) |
[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/arm/common/icst307.c')
-rw-r--r-- | arch/arm/common/icst307.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/common/icst307.c b/arch/arm/common/icst307.c index bafe8b19be82..6d094c157540 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) | |||
57 | break; | 57 | break; |
58 | } while (i < ARRAY_SIZE(idx2s)); | 58 | } while (i < ARRAY_SIZE(idx2s)); |
59 | 59 | ||
60 | if (i > ARRAY_SIZE(idx2s)) | 60 | if (i >= ARRAY_SIZE(idx2s)) |
61 | return vco; | 61 | return vco; |
62 | 62 | ||
63 | vco.s = idx2s[i]; | 63 | vco.s = idx2s[i]; |
@@ -119,7 +119,7 @@ icst307_ps_to_vco(const struct icst307_params *p, unsigned long period) | |||
119 | break; | 119 | break; |
120 | } while (i < ARRAY_SIZE(idx2s)); | 120 | } while (i < ARRAY_SIZE(idx2s)); |
121 | 121 | ||
122 | if (i > ARRAY_SIZE(idx2s)) | 122 | if (i >= ARRAY_SIZE(idx2s)) |
123 | return vco; | 123 | return vco; |
124 | 124 | ||
125 | vco.s = idx2s[i]; | 125 | vco.s = idx2s[i]; |