mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
Transport drivers (such as rmi_i2c and rmi_spi) invoke
rmi_driver_suspend() and rmi_driver_resume() on their child rmi_dev
device during system power management events. However, transport drivers
are fully registered and operational even if the physical RMI driver
failed to bind or probe the rmi_dev device.
When rmi_driver_suspend() or rmi_driver_resume() is called on an unbound
rmi_dev, dev_get_drvdata() returns NULL. Calling rmi_disable_irq() or
rmi_enable_irq() without driver data attached causes a NULL pointer
dereference and General Protection Fault when attempting to lock
data->enabled_mutex.
Fix this by checking if driver data is attached to rmi_dev in
rmi_driver_suspend() and rmi_driver_resume(), exiting early if
no driver data is present.
Fixes:
|
||
|---|---|---|
| .. | ||
| Kconfig | ||
| Makefile | ||
| rmi_2d_sensor.c | ||
| rmi_2d_sensor.h | ||
| rmi_bus.c | ||
| rmi_bus.h | ||
| rmi_driver.c | ||
| rmi_driver.h | ||
| rmi_f01.c | ||
| rmi_f1a.c | ||
| rmi_f03.c | ||
| rmi_f3a.c | ||
| rmi_f11.c | ||
| rmi_f12.c | ||
| rmi_f21.c | ||
| rmi_f30.c | ||
| rmi_f34.c | ||
| rmi_f34.h | ||
| rmi_f34v7.c | ||
| rmi_f54.c | ||
| rmi_f55.c | ||
| rmi_i2c.c | ||
| rmi_smbus.c | ||
| rmi_spi.c | ||