Re: [PATCH next] iio: adc: qcom-spmi-adc5-gen3: Fix off by one in adc5_gen3_get_fw_channel_data()
From: Jonathan Cameron
Date: Sat Apr 25 2026 - 11:30:38 EST
On Fri, 10 Apr 2026 12:15:41 +0200
Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx> wrote:
> On 4/10/26 12:12 PM, Dan Carpenter wrote:
> > The > in "if (chan > ADC5_MAX_CHANNEL)" should be >= to prevent an out
> > of bound read of the adc->data->adc_chans[] array.
> >
> > Fixes: baff45179e90 ("iio: adc: Add support for QCOM PMIC5 Gen3 ADC")
> > Signed-off-by: Dan Carpenter <error27@xxxxxxxxx>
> > ---
>
> Reviewed-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>
>
This was waiting on the char-misc pull requests going upstream so I could
rebase my fixes branch. That's now happened, but I will rebase again on
rc1 once available (as a pull request based mid merge window isn't the best plan!)
Anyhow applied to the fixes-togreg branch of iio.git.
Thanks,
Jonathan
> Konrad