From faacdbd9cf5784ab0aa9e859c9dcbb74c97c7ec6 Mon Sep 17 00:00:00 2001 From: Ian Lepore Date: Fri, 3 Jan 2014 21:38:33 +0000 Subject: [PATCH] Fix a typo that caused a loop to run beyond the end of the array it was searching. If you didn't configure a timer capture pin you'd get a data abort as it wandered into the weeds, now you get a nice warning message about your config, as originally intended. --- sys/arm/ti/am335x/am335x_dmtimer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm/ti/am335x/am335x_dmtimer.c b/sys/arm/ti/am335x/am335x_dmtimer.c index 69ad6e3d0bde..8007ca14c3e7 100644 --- a/sys/arm/ti/am335x/am335x_dmtimer.c +++ b/sys/arm/ti/am335x/am335x_dmtimer.c @@ -372,7 +372,7 @@ am335x_dmtimer_pps_init(device_t dev, struct am335x_dmtimer_softc *sc) * yet from ti_scm.h. */ timer_num = 0; - for (i = 0; nitems(padinfo) && timer_num == 0; ++i) { + for (i = 0; i < nitems(padinfo) && timer_num == 0; ++i) { if (ti_scm_padconf_get(padinfo[i].ballname, &padmux, &padstate) == 0) { if (strcasecmp(padinfo[i].muxname, padmux) == 0 &&