USB: android: Fix error handling when ffs_func_bind fails
In some cases it is observed that usb_add_function() fails with
ffs_function_bind_config() due to ffs_func_bind() fails. When
adbd closes eps, it is trying to reference NULL function pointer
as below:
__fput
|
ffs_epfile_release
|
ffs_data_closed
|
ffs_data_clear
|
functionfs_closed_callback
|
usb_put_function()
Hence handle error case and add check with config->func against NULL.
CRs-Fixed: 848903
Change-Id: Idd260655b8944bd6b21f7bbe3c0340af88f99dfd
Signed-off-by:
Mayank Rana <mrana@codeaurora.org>
Loading
Please register or sign in to comment