patch "iio: adc: stm32: fix bad error check on max_channels" added to staging-linus
Subsystems (3)
This is a note to let you know that I've just added the patch titled
iio: adc: stm32: fix bad error check on max_channels
to my staging git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
in the staging-linus branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
Quoted 1 line
From
4fb840c95f82652cece7352be9080884cafb92a0Mon Sep 17 00:00:00 2001
From: Fabrice Gasnier <[email protected]>
Date: Mon, 18 Sep 2017 18:24:15 +0200
Subject: iio: adc: stm32: fix bad error check on max_channels
Fix a bad error check when counting 'st,adc-channels' array elements. This is seen when all channels are in use simultaneously.
--- drivers/iio/adc/stm32-adc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/stm32-adc.c +1 -1
@@ -1656,7 +1656,7 @@ static int stm32_adc_chan_of_init(struct iio_dev *indio_dev) num_channels =of_property_count_u32_elems (node,"st,adc-channels" );if (num_channels <0 || - num_channels >= adc_info->max_channels) { + num_channels > adc_info->max_channels) {dev_err (&indio_dev->dev,"Bad st,adc-channels?\n" );return num_channels <0 ? num_channels : -EINVAL ; }
Signature · 1 line
2.14.1