USB: android: Set dev->enabled to true if android_enable fails
There is a chance that android_enable() fails if f_fs driver
returns error due to strings not popluated by userspace. In this
scenario, setting dev->enabled to false, which leads to android_disable()
not called when userspace tries to disable. This leads to crash later
if composition switch happens and new one doesn't have ADB enabled in
the list. Hence fix this by setting dev->enabled to true so that
android_disable() gets called which calls function driver's disable()
callback.
Change-Id: I1ae4e8e7c407f132f5d36573510250e1c7133726
Signed-off-by:
Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Loading
Please register or sign in to comment