summaryrefslogtreecommitdiffstats
path: root/drivers/iio/common
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2016-08-30 10:18:39 +0200
committerJonathan Cameron <jic23@kernel.org>2016-09-03 17:25:54 +0100
commit1b246fca4adaa0bf440b604366f2227cc4cde702 (patch)
tree8a80872c972915cd1ca8d9763af0eec20d307308 /drivers/iio/common
parent4075a283ae83f49f923a2a92935aa72be2c1ca85 (diff)
downloadop-kernel-dev-1b246fca4adaa0bf440b604366f2227cc4cde702.zip
op-kernel-dev-1b246fca4adaa0bf440b604366f2227cc4cde702.tar.gz
iio: st_sensors: fix errorcheck for regulators
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> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/common')
-rw-r--r--drivers/iio/common/st_sensors/st_sensors_core.c4
1 files 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 41bfe1c..285a64a 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);
OpenPOWER on IntegriCloud