]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
iio: adc: ad7192: Revert "properly check spi_get_device_match_data()"
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 17 Feb 2026 08:05:14 +0000 (09:05 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 23 Feb 2026 08:24:23 +0000 (08:24 +0000)
This reverts commit b7f99fa1b64af2f696b13cec581cb4cd7d3982b8.

The added code is currently a dead code. Moreover, the driver is not
designed to have any defaults effectively making driver data a mandatory
information to work with. Taking all together, revert unneeded change.

Discussion at #1 concluded in agreeing a new policy on this for IIO.

Link: https://lore.kernel.org/linux-iio/20260217080514.1288115-1-andriy.shevchenko@linux.intel.com/
Reported-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ad7192.c

index 530e1d307860ef9b77ead5c05ad13c60e46ffcf0..8b1664f6b102c8e9f9083281bd1140a8fc035eeb 100644 (file)
@@ -1402,9 +1402,6 @@ static int ad7192_probe(struct spi_device *spi)
        st->int_vref_mv = ret == -ENODEV ? avdd_mv : ret / MILLI;
 
        st->chip_info = spi_get_device_match_data(spi);
-       if (!st->chip_info)
-               return -ENODEV;
-
        indio_dev->name = st->chip_info->name;
        indio_dev->modes = INDIO_DIRECT_MODE;
        indio_dev->info = st->chip_info->info;