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.
Change-Id: I7abee3f1ad6c73e1c38aa64e627ffd73f6f9d3b2
Signed-off-by:
Mao Li <maol@codeaurora.org>
Loading
Please register or sign in to comment