On Tue, 11-May-10 4:38 AM +0530, Rick Ball wrote: > I think I've found a small problem in the board-omap3evm.c file under arch/arm/mach-omap2 (support for the TI/Mistral OMAP35x EVM board). > > What I noticed is that the declaration for the array gpio_leds is initialized with one element (at line 380): > > static struct gpio_led gpio_leds[] = { > { > .name = "omap3evm::ledb", > /* normally not visible (board underside) */ > .default_trigger = "default-on", > .gpio = -EINVAL, /* gets replaced */ > .active_low = true, > }, > }; > > But then down at line 430 element 2 is set: > > /* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */ > gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1; > > How did the array end up with 3 elements so that 2 would be a valid index? It looks to me like it wouldn't flag an error, but would corrupt memory. I'd submit a patch, but I'm not sure what this code was attempting to do... This appears to be like a bug. Possibly there would have been some entries earlier which got removed, but the indexing done in the code never got updated. - Ranjith -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html