Skip to content

Commit e2d82b9

Browse files
machschmittnunojsa
authored andcommitted
iio: adc: ad4630: Add probe error messages
Signed-off-by: Marcelo Schmitt <marcelo.schmitt@analog.com>
1 parent a18c50e commit e2d82b9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/iio/adc/ad4630.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1479,7 +1479,8 @@ static int ad4630_probe(struct spi_device *spi)
14791479

14801480
ret = ad4630_config(st);
14811481
if (ret)
1482-
return ret;
1482+
return dev_err_probe(&spi->dev, ret,
1483+
"Config failed: %d\n", ret);
14831484

14841485
if (st->pga_gpios) {
14851486
ad4630_fill_scale_tbl(st);
@@ -1496,7 +1497,8 @@ static int ad4630_probe(struct spi_device *spi)
14961497

14971498
ret = ad4630_pwm_get(st);
14981499
if (ret)
1499-
return ret;
1500+
return dev_err_probe(&spi->dev, ret,
1501+
"Failed to get PWM: %d\n", ret);
15001502

15011503
indio_dev->name = st->chip->name;
15021504
indio_dev->info = &ad4630_info;

0 commit comments

Comments
 (0)