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

Commit af068e4b authored by Mayank Rana's avatar Mayank Rana
Browse files

USB: android: Add check before calling function's unbind_config()



In some of cases when function's bind() is failing, we are trying to call
each function's unbind_config() API if function supports that even if that
function is not bound yet. Fix this issue by adding bound variable with
android_usb_function and using when function's bind_config() and bind()
are successfully called.

example:
USB composition: diag,adb,mass_storage
if adb function's bind() is failing, then unbind_config() of mass_storage
function is being called as part of error handling which results into
crash as mass storage function's bind_config() and bind() are not yet
called.

CRs-Fixed: 853742
Change-Id: Ib8246c4f830ecffca633f6c1ab763f03c44de0a9
Signed-off-by: default avatarMayank Rana <mrana@codeaurora.org>
parent a48f5ed1
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