Commit 0d8391f3 authored by Dan Carpenter's avatar Dan Carpenter Committed by Jonathan Cameron

iio:adc: ad7766: testing the wrong variable in probe

We should be testing "ret" here.

Fixes: aa16c6bd ("iio:adc: Add support for AD7766/AD7767")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent b548674e
...@@ -239,8 +239,8 @@ static int ad7766_probe(struct spi_device *spi) ...@@ -239,8 +239,8 @@ static int ad7766_probe(struct spi_device *spi)
ret = devm_regulator_bulk_get(&spi->dev, ARRAY_SIZE(ad7766->reg), ret = devm_regulator_bulk_get(&spi->dev, ARRAY_SIZE(ad7766->reg),
ad7766->reg); ad7766->reg);
if (IS_ERR(ad7766->reg)) if (ret)
return PTR_ERR(ad7766->reg); return ret;
ad7766->pd_gpio = devm_gpiod_get_optional(&spi->dev, "powerdown", ad7766->pd_gpio = devm_gpiod_get_optional(&spi->dev, "powerdown",
GPIOD_OUT_HIGH); GPIOD_OUT_HIGH);
......
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