mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 07:51:31 -04:00
iio: frequency: ad9523: 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> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
committed by
Jonathan Cameron
parent
9582a65eda
commit
6849c6356b
@@ -955,10 +955,8 @@ static int ad9523_probe(struct spi_device *spi)
|
||||
int ret;
|
||||
|
||||
pdata = dev_get_platdata(dev);
|
||||
if (!pdata) {
|
||||
dev_err(&spi->dev, "no platform data?\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
if (!pdata)
|
||||
return dev_err_probe(dev, -EINVAL, "no platform data?\n");
|
||||
|
||||
indio_dev = devm_iio_device_alloc(dev, sizeof(*st));
|
||||
if (indio_dev == NULL)
|
||||
|
||||
Reference in New Issue
Block a user