mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
iio: adc: ad7791: 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
d9e85469a7
commit
db935b8cac
|
|
@ -413,10 +413,8 @@ static int ad7791_probe(struct spi_device *spi)
|
|||
struct ad7791_state *st;
|
||||
int ret;
|
||||
|
||||
if (!spi->irq) {
|
||||
dev_err(&spi->dev, "Missing IRQ.\n");
|
||||
return -ENXIO;
|
||||
}
|
||||
if (!spi->irq)
|
||||
return dev_err_probe(dev, -ENXIO, "Missing IRQ.\n");
|
||||
|
||||
indio_dev = devm_iio_device_alloc(dev, sizeof(*st));
|
||||
if (!indio_dev)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user