Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

iio: adc: stm32: Fixing err code to not indicate success

This path would result in returning 0 / success on an error path.

Cc: Olivier Moysan <olivier.moysan@foss.st.com>
Fixes: 95bc818404b2 ("iio: adc: stm32-adc: add support of generic channels binding")
Reviewed-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Link: https://lore.kernel.org/r/20240330185305.1319844-4-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

+1
+1
drivers/iio/adc/stm32-adc.c
··· 2234 2234 if (vin[0] != val || vin[1] >= adc_info->max_channels) { 2235 2235 dev_err(&indio_dev->dev, "Invalid channel in%d-in%d\n", 2236 2236 vin[0], vin[1]); 2237 + ret = -EINVAL; 2237 2238 goto err; 2238 2239 } 2239 2240 } else if (ret != -EINVAL) {