diff options
| author | Jiale Yao <yaojiale02@163.com> | 2026-09-25 20:57:45 +0800 |
|---|---|---|
| committer | Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> | 2026-09-28 17:07:35 +0100 |
| commit | 156898c0f91aa731821d54fff910242f60b12e17 (patch) | |
| tree | 01f2f18148781e65a5f4fd55e2aacc616205d25f /tools/perf/scripts/python/task-analyzer.py | |
| parent | 4ac257f2fd2a9cac00e748486fa003b4e1cc453e (diff) | |
| download | linux-next-156898c0f91aa731821d54fff910242f60b12e17.tar.gz linux-next-156898c0f91aa731821d54fff910242f60b12e17.zip | |
iio: adc: ti-ads1018: reject devices without match data
SPI driver_override allows a device to bind to this driver without
matching either the OF or SPI device ID table. In that case,
spi_get_device_match_data() returns NULL.
ads1018_spi_probe() immediately dereferences the returned chip
information to initialize the IIO device, causing a NULL pointer
dereference.
Commit 572a00852635 ("iio: dac: ad5686: missing NULL check on match
data") fixed the same driver_override issue in another SPI driver.
Reject devices without match data before allocating the IIO device.
Fixes: bf0bba486b5b ("iio: adc: Add ti-ads1018 driver")
Cc: stable@vger.kernel.org
Signed-off-by: Jiale Yao <yaojiale02@163.com>
Reviewed-by: Kurt Borja <kuurtb@gmail.com>
Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions
