Re: [PATCH] pinctrl: sunxi: Add some defensiveness for regulators array

From: Chen-Yu Tsai
Date: Wed Jul 12 2023 - 13:57:29 EST


On Thu, Jul 13, 2023 at 1:20 AM Mark Brown <broonie@xxxxxxxxxx> wrote:
>
> The sunxi pinctrl has a fixed size array it uses to store regulators used
> in the driver. There is currently nothing that ensures that the number of
> elements in the array is large enough to map the regulators defined by the
> individual SoCs. While this is currently the case having an explicit check
> in there will make life easier for anyone debugging memory issues that
> manifest in the driver so let's add one.
>
> Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>

Reviewed-by: Chen-Yu Tsai <wens@xxxxxxxx>