input: synaptics_i2c_rmi4: Add check to avoid memory leak
Add conditions to check if fhandler already exists in the list
or not. If exists, then free the memory allocated to the new
fhandler. Otherwise add the fhandler to the list.
Change the location of INIT_LIST_HEAD() call to avoid
memory leak.
CRs-fixed: 575094
This patch is propagated from msm-3.10 kernel
(commit: 89e6a2c4d5b7c9ebeeb190b4f28bff5b2dd95fcb
input: synaptics_i2c_rmi4: Add check to avoid memory leak)
Signed-off-by:
Shantanu Jain <shjain@codeaurora.org>
Change-Id: Iaf1429b911baffa53f968c0ca986fec190100ded
Loading
Please register or sign in to comment