diff options
author | davidycchen <davidycchen@google.com> | 2022-02-25 16:16:40 +0800 |
---|---|---|
committer | davidycchen <davidycchen@google.com> | 2022-02-25 16:16:40 +0800 |
commit | 70122554df175cab53d3a229cba5348aa7f920da (patch) | |
tree | 8f00a7125d1c8c48e3b2269a722eeaf489363802 | |
parent | df62c0c6d6af7052fcbd62f270fe9224daad34f2 (diff) | |
download | synaptics_touch-70122554df175cab53d3a229cba5348aa7f920da.tar.gz |
synaptics: call cancel_work_sync while module remove to avoid NULL pointer
Bug: 221311444
Test: remove touch module during touch resume.
Signed-off-by: davidycchen <davidycchen@google.com>
Change-Id: I1e83cc22ccff8126cf7040654a7d8cc60ad43204
-rw-r--r-- | syna_tcm2.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/syna_tcm2.c b/syna_tcm2.c index 61d98c8..95046a2 100644 --- a/syna_tcm2.c +++ b/syna_tcm2.c @@ -2752,6 +2752,9 @@ static int syna_dev_remove(struct platform_device *pdev) destroy_workqueue(tcm->helper.workqueue); #endif + cancel_work_sync(&tcm->suspend_work); + cancel_work_sync(&tcm->resume_work); + #if IS_ENABLED(CONFIG_TOUCHSCREEN_TBN) if (tcm->tbn_register_mask) unregister_tbn(&tcm->tbn_register_mask); |