Re: [PATCH] soc: qcom: socinfo: Fix an off by one in qcom_show_pmic_model()

From: Doug Anderson
Date: Wed Jan 20 2021 - 11:28:37 EST


Hi,

On Wed, Jan 20, 2021 at 1:58 AM Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:
>
> These need to be < ARRAY_SIZE() instead of <= ARRAY_SIZE() to prevent
> accessing one element beyond the end of the array.
>
> Fixes: e9247e2ce577 ("soc: qcom: socinfo: fix printing of pmic_model")
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> ---
> drivers/soc/qcom/socinfo.c | 2 +-
> 1 file changed, 1 insertions(+), 1 deletions(-)

Reviewed-by: Douglas Anderson <dianders@xxxxxxxxxxxx>