Re: [PATCH v6 3/8] iio: adc: stm32: Fixing err code to not indicate success

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 12 Apr 2024 14:31:20 +0200
Fabrice Gasnier <fabrice.gasnier@xxxxxxxxxxx> wrote:

> On 3/30/24 19:53, Jonathan Cameron wrote:
> > From: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
> > 
> > This path would result in returning 0 / success on an error path.
> > 
> > Cc: Olivier Moysan <olivier.moysan@xxxxxxxxxxx>
> > Cc: Fabrice Gasnier <fabrice.gasnier@xxxxxxxxxxx>
> > Fixes: 95bc818404b2 ("iio: adc: stm32-adc: add support of generic channels binding")
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
> > ---
> >  drivers/iio/adc/stm32-adc.c | 1 +
> >  1 file changed, 1 insertion(+)
> >   
> 
> Hi Jonathan,
> 
> You can add my:
> Reviewed-by: Fabrice Gasnier <fabrice.gasnier@xxxxxxxxxxx>
Applied. I'll take this via the slow path and queue it for next merge window rather
than rushing it through as a fix.

Thanks

Jonathan


> 
> Best Regards,
> Thanks,
> Fabrice
> 
> > diff --git a/drivers/iio/adc/stm32-adc.c b/drivers/iio/adc/stm32-adc.c
> > index b5d3c9cea5c4..283c20757106 100644
> > --- a/drivers/iio/adc/stm32-adc.c
> > +++ b/drivers/iio/adc/stm32-adc.c
> > @@ -2234,6 +2234,7 @@ static int stm32_adc_generic_chan_init(struct iio_dev *indio_dev,
> >  			if (vin[0] != val || vin[1] >= adc_info->max_channels) {
> >  				dev_err(&indio_dev->dev, "Invalid channel in%d-in%d\n",
> >  					vin[0], vin[1]);
> > +				ret = -EINVAL;
> >  				goto err;
> >  			}
> >  		} else if (ret != -EINVAL) {  
> 





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux