usb: android: Fix crash on composition switch from ecm
unbind_config() extracts each member from the functions list and calls
unbind_config() callback of that particular function driver. Also before
calling the unbind() callback it deletes this function from the function
list.
ecm_function_unbind_config() calls usb_remove_function() which again tries
to delete the ecm function from the function list and this leads to a
crash.
Fix this by instantiating the ecm function in ecm_function_bind_config()
and de-instantiating in ecm_function_unbind_config().
Change-Id: Iec315d592ad882087a31bfd394c28373b9b06720
Signed-off-by:
Tarun Gupta <tarung@codeaurora.org>
Loading
Please register or sign in to comment