Re: [PATCH] iio: st_sensors: fix errorcheck for regulators

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

 



On 30/08/16 09:18, Linus Walleij wrote:
> We were checking the return code of vdd when we should be checking
> vdd_io. My mistake, mea culpa.
> 
> Cc: Giuseppe BARBA <giuseppe.barba@xxxxxx>
> Reported-by: Giuseppe BARBA <giuseppe.barba@xxxxxx>
> Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>

Applied to the togreg branch of iio.git.

Thanks,

Jonathan
> ---
>  drivers/iio/common/st_sensors/st_sensors_core.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/common/st_sensors/st_sensors_core.c b/drivers/iio/common/st_sensors/st_sensors_core.c
> index 41bfe1c5f4e9..285a64a589d7 100644
> --- a/drivers/iio/common/st_sensors/st_sensors_core.c
> +++ b/drivers/iio/common/st_sensors/st_sensors_core.c
> @@ -247,9 +247,9 @@ int st_sensors_power_enable(struct iio_dev *indio_dev)
>  	}
>  
>  	pdata->vdd_io = devm_regulator_get(indio_dev->dev.parent, "vddio");
> -	if (IS_ERR(pdata->vdd)) {
> +	if (IS_ERR(pdata->vdd_io)) {
>  		dev_err(&indio_dev->dev, "unable to get Vdd_IO supply\n");
> -		err = PTR_ERR(pdata->vdd);
> +		err = PTR_ERR(pdata->vdd_io);
>  		goto st_sensors_disable_vdd;
>  	}
>  	err = regulator_enable(pdata->vdd_io);
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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