On 20/02/2020 16:14, Linus Walleij wrote: > On Tue, Feb 18, 2020 at 6:55 AM Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote: > >> These comparisons should be >= instead of > to prevent accessing one >> element beyond the end of the hw->soc->pins[] array. >> >> Fixes: 3de7deefce69 ("pinctrl: mediatek: Check gpio pin number and use binary search in mtk_hw_pin_field_lookup()") >> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> > > Matthias could you have a look at this patch? > >From what I see hw->soc->npins is the ARRAY_SIZE() of the pins. So the index should smaller hw->soc->npins. Reviewed-by: Matthias Brugger <matthias.bgg@xxxxxxxxx>