Re: [PATCH] ns2: Fix off by one bugs in ns2_pinmux_enable()
From: Linus Walleij
Date: Fri Oct 04 2019 - 18:14:29 EST
On Thu, Sep 26, 2019 at 10:14 AM Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:
> The pinctrl->functions[] array has pinctrl->num_functions elements and
> the pinctrl->groups[] array is the same way. These are set in
> ns2_pinmux_probe(). So the > comparisons should be >= so that we don't
> read one element beyond the end of the array.
>
> Fixes: b5aa1006e4a9 ("pinctrl: ns2: add pinmux driver support for Broadcom NS2 SoC")
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Patch applied with Scott's ACK.
Yours,
Linus Walleij