diff options
| author | Josef Bacik <josef@toxicpanda.com> | 2026-10-27 17:19:19 +0100 |
|---|---|---|
| committer | Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> | 2026-11-02 00:39:50 +0000 |
| commit | f3fc8718af9189aad13a2ad7f5b256475bb14b21 (patch) | |
| tree | 6df41b1fa804add0197d8162b6911aef21db9f20 /tools/perf/scripts/python | |
| parent | b8ed9165906597b69a46fabf39ab41690721ebe8 (diff) | |
iio: sx9310: use the data of the I2C table
sx9310_check_whoami() takes the chip information from
device_get_match_data(), which only looks at the OF and ACPI tables, and
dereferences it. For a client which was bound through the i2c_device_id
table, for instance one created with
echo sx9310 0x28 > /sys/bus/i2c/devices/i2c-1/new_device
it returns NULL, and the kernel oopses as soon as something at that address
answers the read of the WHOAMI register.
The I2C table has the same pointers. Use i2c_get_match_data(), which falls
back to it.
Fixes: 21fd3b1373f6 ("iio: proximity: sx9310: Convert enum->pointer for match data table")
Cc: stable <stable@kernel.org>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
