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: dac: ad7293: use dev_err_probe()

Use dev_err_probe() consistently in the probe path to simplify error
handling and ensure deferred probes are logged correctly.

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
bbb8e120 70b9d4af

+3 -5
+3 -5
drivers/iio/dac/ad7293.c
··· 806 806 { 807 807 int ret; 808 808 u16 chip_id; 809 - struct spi_device *spi = st->spi; 809 + struct device *dev = &st->spi->dev; 810 810 811 811 ret = ad7293_properties_parse(st); 812 812 if (ret) ··· 821 821 if (ret) 822 822 return ret; 823 823 824 - if (chip_id != AD7293_CHIP_ID) { 825 - dev_err(&spi->dev, "Invalid Chip ID.\n"); 826 - return -EINVAL; 827 - } 824 + if (chip_id != AD7293_CHIP_ID) 825 + return dev_err_probe(dev, -EINVAL, "Invalid Chip ID.\n"); 828 826 829 827 if (!st->vrefin_en) 830 828 return __ad7293_spi_update_bits(st, AD7293_REG_GENERAL,