There are only three counter/timers on the integrator board:
correct the bounds check to avoid an array overrun. (Spotted
by Coverity, see bug 887883).
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
/* ??? Don't know the PrimeCell ID for this device. */
n = offset >> 8;
- if (n > 3) {
+ if (n > 2) {
hw_error("sp804_read: Bad timer %d\n", n);
}
int n;
n = offset >> 8;
- if (n > 3) {
+ if (n > 2) {
hw_error("sp804_write: Bad timer %d\n", n);
}