aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio/dac/ad5446.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/iio/dac/ad5446.c')
-rw-r--r--drivers/iio/dac/ad5446.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/iio/dac/ad5446.c b/drivers/iio/dac/ad5446.c
index 29f653dab2f7..f5583aedfb59 100644
--- a/drivers/iio/dac/ad5446.c
+++ b/drivers/iio/dac/ad5446.c
@@ -226,7 +226,11 @@ static int ad5446_probe(struct device *dev, const char *name,
226 if (ret) 226 if (ret)
227 goto error_put_reg; 227 goto error_put_reg;
228 228
229 voltage_uv = regulator_get_voltage(reg); 229 ret = regulator_get_voltage(reg);
230 if (ret < 0)
231 goto error_disable_reg;
232
233 voltage_uv = ret;
230 } 234 }
231 235
232 indio_dev = iio_device_alloc(sizeof(*st)); 236 indio_dev = iio_device_alloc(sizeof(*st));