Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Antoniu Miclaus and committed by
Jonathan Cameron
6849c635 9582a65e

+2 -4
+2 -4
drivers/iio/frequency/ad9523.c
··· 955 955 int ret; 956 956 957 957 pdata = dev_get_platdata(dev); 958 - if (!pdata) { 959 - dev_err(&spi->dev, "no platform data?\n"); 960 - return -EINVAL; 961 - } 958 + if (!pdata) 959 + return dev_err_probe(dev, -EINVAL, "no platform data?\n"); 962 960 963 961 indio_dev = devm_iio_device_alloc(dev, sizeof(*st)); 964 962 if (indio_dev == NULL)