Commit 1b246fca authored by Linus Walleij's avatar Linus Walleij Committed by Jonathan Cameron

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: default avatarGiuseppe BARBA <giuseppe.barba@st.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 4075a283
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment