Re: [PATCH next] iio: adc: qcom-spmi-adc5-gen3: Fix off by one in adc5_gen3_get_fw_channel_data()

Jonathan Cameron <[email protected]>
Newsgroups org.kernel.vger.kernel-janitors,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-iio,org.kernel.vger.linux-kernel
Message-ID <20260425163025.59db1d00@jic23-huawei>
On Fri, 10 Apr 2026 12:15:41 +0200
Konrad Dybcio <[email protected]> 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 <[email protected]>
> > ---  
> 
> Reviewed-by: Konrad Dybcio <[email protected]>
> 
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.