diff options
author | PixelBot AutoMerger <android-nexus-securitybot@system.gserviceaccount.com> | 2023-01-08 18:57:43 -0800 |
---|---|---|
committer | SecurityBot <android-nexus-securitybot@system.gserviceaccount.com> | 2023-01-08 18:57:43 -0800 |
commit | 7ab600322e6f16d213f9af7db1f42b642a0e43c5 (patch) | |
tree | 48ef9efbeccdbe22a3acc926a24fbb1ceca6382c | |
parent | 70342895e8e0d0cb86919a3f27e3a0c527b4af68 (diff) | |
parent | ab5ad8a0698bee68c6c04929202242fb83d37ad3 (diff) | |
download | synaptics_touch-7ab600322e6f16d213f9af7db1f42b642a0e43c5.tar.gz |
Merge android13-gs-pixel-5.10-tm-qpr3 into android13-gs-pixel-5.10-udcandroid-u-preview-2_r0.4android-u-preview-2_r0.3android-u-preview-2_r0.2android-u-beta-1_r0.5android-u-beta-1_r0.4android-u-beta-1_r0.3android-gs-raviole-5.10-u-preview-2android-gs-raviole-5.10-u-beta1android-gs-pantah-5.10-u-preview-2android-gs-pantah-5.10-u-beta1android-gs-bluejay-5.10-u-preview-2android-gs-bluejay-5.10-u-beta1
SBMerger: 478053055
Change-Id: I76365a5dfef67c5088df9f1116be1e405ba7e98f
Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
-rw-r--r-- | syna_tcm2.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/syna_tcm2.c b/syna_tcm2.c index dcd10d2..e6d7610 100644 --- a/syna_tcm2.c +++ b/syna_tcm2.c @@ -3350,10 +3350,6 @@ static int syna_dev_remove(struct platform_device *pdev) if (tcm->tbn_register_mask) unregister_tbn(&tcm->tbn_register_mask); #endif - cpu_latency_qos_remove_request(&tcm->pm_qos_req); - - if (tcm->raw_data_buffer) - kfree(tcm->raw_data_buffer); #if defined(USE_DRM_BRIDGE) syna_unregister_panel_bridge(&tcm->panel_bridge); @@ -3372,6 +3368,12 @@ static int syna_dev_remove(struct platform_device *pdev) syna_cdev_remove_sysfs(tcm); #endif + /* check the connection statusm, and do disconnection */ + if (tcm->dev_disconnect(tcm) < 0) + LOGE("Fail to do device disconnection\n"); + + cpu_latency_qos_remove_request(&tcm->pm_qos_req); + #if IS_ENABLED(CONFIG_TOUCHSCREEN_OFFLOAD) touch_offload_cleanup(&tcm->offload); #endif @@ -3380,9 +3382,10 @@ static int syna_dev_remove(struct platform_device *pdev) heatmap_remove(&tcm->v4l2); #endif - /* check the connection statusm, and do disconnection */ - if (tcm->dev_disconnect(tcm) < 0) - LOGE("Fail to do device disconnection\n"); + if (tcm->raw_data_buffer) { + kfree(tcm->raw_data_buffer); + tcm->raw_data_buffer = NULL; + } syna_tcm_buf_release(&tcm->event_data); |