Skip to content

Commit c62dd44

Browse files
Marco Felschjic23
authored andcommitted
iio: adc: ad799x: fix probe error handling
Since commit 0f7ddcc ("iio:adc:ad799x: Write default config on probe and reset alert status on probe") the error path is wrong since it leaves the vref regulator on. Fix this by disabling both regulators. Fixes: 0f7ddcc ("iio:adc:ad799x: Write default config on probe and reset alert status on probe") Signed-off-by: Marco Felsch <[email protected]> Reviewed-by: Alexandru Ardelean <[email protected]> Cc: <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
1 parent 7fd1c26 commit c62dd44

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/iio/adc/ad799x.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -810,10 +810,10 @@ static int ad799x_probe(struct i2c_client *client,
810810

811811
ret = ad799x_write_config(st, st->chip_config->default_config);
812812
if (ret < 0)
813-
goto error_disable_reg;
813+
goto error_disable_vref;
814814
ret = ad799x_read_config(st);
815815
if (ret < 0)
816-
goto error_disable_reg;
816+
goto error_disable_vref;
817817
st->config = ret;
818818

819819
ret = iio_triggered_buffer_setup(indio_dev, NULL,

0 commit comments

Comments
 (0)