diff options
| author | Hugo Villeneuve <[email protected]> | 2024-01-18 10:21:57 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2024-01-27 19:05:03 -0800 |
| commit | 0d27056c24efd3d63a03f3edfbcfc4827086b110 (patch) | |
| tree | cf57999a3efe71e4cac8c52bdfed125293cf407e /tools/perf/scripts/python/bin/stackcollapse-report | |
| parent | 5d207f62cec8d6e6f0fb6f35495723bf3960daf7 (diff) | |
serial: max310x: fix NULL pointer dereference in I2C instantiation
When trying to instantiate a max14830 device from userspace:
echo max14830 0x60 > /sys/bus/i2c/devices/i2c-2/new_device
we get the following error:
Unable to handle kernel NULL pointer dereference at virtual address...
...
Call trace:
max310x_i2c_probe+0x48/0x170 [max310x]
i2c_device_probe+0x150/0x2a0
...
Add check for validity of devtype to prevent the error, and abort probe
with a meaningful error message.
Fixes: 2e1f2d9a9bdb ("serial: max310x: implement I2C support")
Cc: [email protected]
Reviewed-by: Andy Shevchenko <[email protected]>
Signed-off-by: Hugo Villeneuve <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions