Re: [PATCH] iio: dac: fix an error code in probe()

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

 



On Mon, 16 Aug 2021 21:39:54 +0300
Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:

> If we have an unexpected number of channels then return -EINVAL instead
> of returning success.
> 
> Fixes: df38a4a72a3b ("iio: dac: add TI DAC5571 family support")
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Given I'm not going to be doing another fixes pull for 5.14 (bit late afterall!)
I've rebased the fixes-togreg branch to match staging/staging-next which will
go in during the merge window + applied this on top.

Thanks,

Jonathan

> ---
>  drivers/iio/dac/ti-dac5571.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/iio/dac/ti-dac5571.c b/drivers/iio/dac/ti-dac5571.c
> index 2a5ba1b08a1d..546a4cf6c5ef 100644
> --- a/drivers/iio/dac/ti-dac5571.c
> +++ b/drivers/iio/dac/ti-dac5571.c
> @@ -350,6 +350,7 @@ static int dac5571_probe(struct i2c_client *client,
>  		data->dac5571_pwrdwn = dac5571_pwrdwn_quad;
>  		break;
>  	default:
> +		ret = -EINVAL;
>  		goto err;
>  	}
>  




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux