Change-Id: I56071262458b93028ffa703e7eba1094ae229c34
Signed-off-by: Jaehyoung Choi <jkkkkk.choi@samsung.com>
Signed-off-by: Kim Gunho <gunho.kim@samsung.com>
{
#ifdef PROXIMITY_MODE
struct synaptics_rmi4_f51_handle *f51 = rmi4_data->f51;
+ static int is_f51_free = 0;
#endif
if (fhandler->fn_number == SYNAPTICS_RMI4_F1A) {
} else {
#ifdef PROXIMITY_MODE
if (fhandler->fn_number == SYNAPTICS_RMI4_F51) {
- kfree(f51);
- f51 = NULL;
+ if (!is_f51_free) {
+ kfree(f51);
+ f51 = NULL;
+ is_f51_free = 1;
+ }
+ else
+ f51 = NULL;
}
#endif
kfree(fhandler->data);