diff options
| author | Jiale Yao <yaojiale02@163.com> | 2026-09-25 20:57:47 +0800 |
|---|---|---|
| committer | Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> | 2026-09-28 17:07:35 +0100 |
| commit | 6bdeaf23ef8062f4c38c025c50e524f1e4d59647 (patch) | |
| tree | 0b6ef127cfb5bd2ac2a6ba3213b98f0b77df0f74 /tools/perf/scripts/python/stackcollapse.py | |
| parent | 9f0e96713033e5fe5a7a232e2c3aa994a8d2862f (diff) | |
| download | linux-next-6bdeaf23ef8062f4c38c025c50e524f1e4d59647.tar.gz linux-next-6bdeaf23ef8062f4c38c025c50e524f1e4d59647.zip | |
iio: adc: ti-ads7950: validate SPI 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.
ti_ads7950_probe() also obtains the IIO device name by dereferencing the
result of spi_get_device_id(), which is NULL on the same override path.
The probe can therefore crash before dereferencing the chip information.
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 and use the always available SPI
modalias for the IIO device name.
Fixes: ff0843ceb1fb ("iio: adc: ti-ads7950: remove chip_info[]")
Cc: stable@vger.kernel.org
Signed-off-by: Jiale Yao <yaojiale02@163.com>
Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
