mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 08:07:32 -04:00
synaptics_mmi_class: remove handler fix
External function insertion can be delayed due to ongoing firmware update. However, detection work will still run remove handler if function needs to be re-inserted. Check handle for NULL in remove handler to avoid kernel panic. Change-Id: I87282155d375548b140b8086cee59dde9a552884 Signed-off-by: Konstantin Makariev <hcv867@motorola.com> Reviewed-on: https://gerrit.mot.com/1714293 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Igor Kovalenko <igork@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
9d501e96ea
commit
baebf33071
1 changed files with 4 additions and 0 deletions
|
|
@ -5953,6 +5953,10 @@ static void __exit rmi4_f54_module_exit(void)
|
|||
|
||||
while ((next = synaptics_driver_getdata(next)) != NULL) {
|
||||
f54 = (struct synaptics_rmi4_f54_handle *)next->f54_data;
|
||||
/* f54 can be NULL when function */
|
||||
/* has not been inserted yet */
|
||||
if (f54 == NULL)
|
||||
continue;
|
||||
init_completion(&f54->remove_complete);
|
||||
synaptics_rmi4_new_function(next, RMI_F54, false,
|
||||
synaptics_rmi4_f54_init,
|
||||
|
|
|
|||
Loading…
Reference in a new issue