mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
iio:adc: ad7766: testing the wrong variable in probe
We should be testing "ret" here.
Fixes: aa16c6bd0e ("iio:adc: Add support for AD7766/AD7767")
Signed-off-by: Dan Carpenter <[email protected]>
Acked-by: Lars-Peter Clausen <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
This commit is contained in:
parent
b548674ea7
commit
0d8391f3d6
1 changed files with 2 additions and 2 deletions
|
|
@ -239,8 +239,8 @@ static int ad7766_probe(struct spi_device *spi)
|
|||
|
||||
ret = devm_regulator_bulk_get(&spi->dev, ARRAY_SIZE(ad7766->reg),
|
||||
ad7766->reg);
|
||||
if (IS_ERR(ad7766->reg))
|
||||
return PTR_ERR(ad7766->reg);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ad7766->pd_gpio = devm_gpiod_get_optional(&spi->dev, "powerdown",
|
||||
GPIOD_OUT_HIGH);
|
||||
|
|
|
|||
Loading…
Reference in a new issue