USB: android: Handle error conditions if usb_add_config fails
When bind_config() of any function driver fails, we go ahead and do a
usb_gadget_connect() due to which remove_config is called during
next disconnect process and a crash is observed as we delete the
config->list once again.
So if the bind_config of any function driver fails, don't call
usb_gadget_connect(), instead handle the possible error conditions.
CRs-Fixed: 488052
Change-Id: I974e2838ef5c36e586f49ae783e8608150770883
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2 files changed