* [PATCH] iio: st_sensors: fix errorcheck for regulators
@ 2016-08-30 8:18 Linus Walleij
2016-09-03 16:23 ` Jonathan Cameron
0 siblings, 1 reply; 2+ messages in thread
From: Linus Walleij @ 2016-08-30 8:18 UTC (permalink / raw)
To: Jonathan Cameron, linux-iio; +Cc: Linus Walleij, Giuseppe BARBA
We were checking the return code of vdd when we should be checking
vdd_io. My mistake, mea culpa.
Cc: Giuseppe BARBA <giuseppe.barba@st.com>
Reported-by: Giuseppe BARBA <giuseppe.barba@st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
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);
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] iio: st_sensors: fix errorcheck for regulators
2016-08-30 8:18 [PATCH] iio: st_sensors: fix errorcheck for regulators Linus Walleij
@ 2016-09-03 16:23 ` Jonathan Cameron
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2016-09-03 16:23 UTC (permalink / raw)
To: Linus Walleij, linux-iio; +Cc: Giuseppe BARBA
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@st.com>
> Reported-by: Giuseppe BARBA <giuseppe.barba@st.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
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);
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-03 16:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-30 8:18 [PATCH] iio: st_sensors: fix errorcheck for regulators Linus Walleij
2016-09-03 16:23 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).