diff options
| author | Jiale Yao <yaojiale02@163.com> | 2026-09-25 20:57:41 +0800 |
|---|---|---|
| committer | Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> | 2026-09-28 17:07:35 +0100 |
| commit | e29630bd463eb40e2e86fe45a565fb1d636ac822 (patch) | |
| tree | 86e3834d852c65e68196d55771d4b5295350681c /tools/perf/scripts/python | |
| parent | 7830650d5293a0f412a869225262ca51b661e49f (diff) | |
| download | linux-next-e29630bd463eb40e2e86fe45a565fb1d636ac822.tar.gz linux-next-e29630bd463eb40e2e86fe45a565fb1d636ac822.zip | |
iio: adc: ad7768-1: 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.
ad7768_probe() later dereferences the returned chip information to
initialize the IIO channels and device name, 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 continuing the probe.
Fixes: fa087f5babbc ("iio: adc: ad7768-1: introduce chip info for future multidevice support")
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')
0 files changed, 0 insertions, 0 deletions
