mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 10:09:10 +02:00
iio: adc: ad7768-1: use dev_err_probe()
Use dev_err_probe() instead of dev_err() in the probe path to ensure proper handling of deferred probing and to simplify error handling. Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
a88442f408
commit
ba1ad6b2de
|
|
@ -1871,10 +1871,8 @@ static int ad7768_probe(struct spi_device *spi)
|
|||
return ret;
|
||||
|
||||
ret = ad7768_setup(indio_dev);
|
||||
if (ret < 0) {
|
||||
dev_err(&spi->dev, "AD7768 setup failed\n");
|
||||
return ret;
|
||||
}
|
||||
if (ret < 0)
|
||||
return dev_err_probe(dev, ret, "AD7768 setup failed\n");
|
||||
|
||||
init_completion(&st->completion);
|
||||
ret = devm_mutex_init(&spi->dev, &st->pga_lock);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user