mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 08:36:12 -04:00
Racer5G: system crash when Synaptics shut dowm
TP: Solve the problem of system crash when the synaptics touch is shut down. Change-Id: I2e483d2a1ff27cb5a2607611843c414dddd87fa9 Reviewed-on: https://gerrit.mot.com/1476476 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Jialei Hao <haojl2@motorola.com> Reviewed-by: Guobin Zhang <zhanggb@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
62b1018459
commit
51ea7ea97c
3 changed files with 7 additions and 8 deletions
|
|
@ -94,7 +94,8 @@
|
|||
|
||||
#define INIT_BUFFER(buffer, is_clone) \
|
||||
mutex_init(&buffer.buf_mutex); \
|
||||
buffer.clone = is_clone
|
||||
buffer.clone = is_clone; \
|
||||
buffer.buf_size = 0
|
||||
|
||||
#define LOCK_BUFFER(buffer) \
|
||||
mutex_lock(&buffer.buf_mutex)
|
||||
|
|
@ -104,7 +105,7 @@
|
|||
|
||||
#define RELEASE_BUFFER(buffer) \
|
||||
do { \
|
||||
if (buffer.clone == false) { \
|
||||
if (buffer.clone == false && (buffer.buf_size != 0)) { \
|
||||
kfree(buffer.buf); \
|
||||
buffer.buf_size = 0; \
|
||||
buffer.data_length = 0; \
|
||||
|
|
|
|||
|
|
@ -1267,9 +1267,8 @@ static int recovery_remove(struct syna_tcm_hcd *tcm_hcd)
|
|||
|
||||
kobject_put(recovery_hcd->sysfs_dir);
|
||||
}
|
||||
|
||||
kfree(recovery_hcd->data_buf);
|
||||
kfree(recovery_hcd->ihex_buf);
|
||||
vfree(recovery_hcd->ihex_buf);
|
||||
kfree(recovery_hcd);
|
||||
recovery_hcd = NULL;
|
||||
|
||||
|
|
|
|||
|
|
@ -2536,14 +2536,13 @@ static int reflash_remove(struct syna_tcm_hcd *tcm_hcd)
|
|||
flush_workqueue(reflash_hcd->workqueue);
|
||||
destroy_workqueue(reflash_hcd->workqueue);
|
||||
#endif
|
||||
|
||||
kfree(reflash_hcd->image_buf);
|
||||
if (reflash_hcd->image_buf)
|
||||
kfree(reflash_hcd->image_buf);
|
||||
|
||||
RELEASE_BUFFER(reflash_hcd->read);
|
||||
RELEASE_BUFFER(reflash_hcd->resp);
|
||||
RELEASE_BUFFER(reflash_hcd->out);
|
||||
|
||||
kfree(reflash_hcd);
|
||||
vfree(reflash_hcd);
|
||||
reflash_hcd = NULL;
|
||||
|
||||
exit:
|
||||
|
|
|
|||
Loading…
Reference in a new issue