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:
Mayank Rana <mrana@codeaurora.org>
Loading
Please register or sign in to comment