Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f26889b4 authored by Mao Li's avatar Mao Li Committed by Gerrit - the friendly Code Review server
Browse files

input: ft5x06_ts: do not free input_dev after unregister it



Once the input device is successfully registered via
input_register_device(), it has to be unregistered via
input_unregister_device(); input_free_device()
should not be called in this case. input_unregister_device()
frees the input device, hence the call to input_free_device()
is a double free. This is also described in comments of
input_unregister_device().

Reorganize the code to avoid a double free.

This patch is propagated from msm-3.10 kernel.
(commit: 896bbd2f9c98f157f2244e7f2f6dba790e50cf00
input: ft5x06_ts: do not free input_dev after unregister it)

Change-Id: I7abee3f1ad6c73e1c38aa64e627ffd73f6f9d3b2
Signed-off-by: default avatarMao Li <maol@codeaurora.org>
parent 5cc0bff8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment