aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/mt6397-core.c
diff options
context:
space:
mode:
authorAndrew Duggan <aduggan@synaptics.com>2019-10-23 01:24:03 +0000
committerJiri Kosina <jkosina@suse.cz>2019-11-18 10:23:45 +0100
commit8725aa4fa7ded30211ebd28bb1c9bae806eb3841 (patch)
treef613288fa75bb99ea87ceae032706954fb3789be /drivers/mfd/mt6397-core.c
parentHID: i2c-hid: Reset ALPS touchpads on resume (diff)
downloadlinux-dev-8725aa4fa7ded30211ebd28bb1c9bae806eb3841.tar.xz
linux-dev-8725aa4fa7ded30211ebd28bb1c9bae806eb3841.zip
HID: rmi: Check that the RMI_STARTED bit is set before unregistering the RMI transport device
In the event that the RMI device is unreachable, the calls to rmi_set_mode() or rmi_set_page() will fail before registering the RMI transport device. When the device is removed, rmi_remove() will call rmi_unregister_transport_device() which will attempt to access the rmi_dev pointer which was not set. This patch adds a check of the RMI_STARTED bit before calling rmi_unregister_transport_device(). The RMI_STARTED bit is only set after rmi_register_transport_device() completes successfully. The kernel oops was reported in this message: https://www.spinics.net/lists/linux-input/msg58433.html [jkosina@suse.cz: reworded changelog as agreed with Andrew] Signed-off-by: Andrew Duggan <aduggan@synaptics.com> Reported-by: Federico Cerutti <federico@ceres-c.it> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/mfd/mt6397-core.c')
0 files changed, 0 insertions, 0 deletions