diff options
| author | Jiale Yao <yaojiale02@163.com> | 2026-09-25 20:57:43 +0800 |
|---|---|---|
| committer | Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> | 2026-09-28 17:07:35 +0100 |
| commit | d3410a48d5eb9dd8238099cb0ee368d12005a385 (patch) | |
| tree | 20bc8b61476ebbd912d91372439d52e5810e99c5 /tools/perf/scripts/python | |
| parent | a07b5db685b2a3084240f9b4a9ee44f3b478c6e3 (diff) | |
| download | linux-next-d3410a48d5eb9dd8238099cb0ee368d12005a385.tar.gz linux-next-d3410a48d5eb9dd8238099cb0ee368d12005a385.zip | |
iio: adc: mcp3911: 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.
mcp3911_probe() stores the result and later calls through chip->config
and accesses other chip-specific fields, 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: 732ad34260d3 ("iio: adc: mcp3911: add support for the whole MCP39xx family")
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
