USB: android: Check ffs->state in ffs_ready_callback
In some cases race condition seen where adbd is being killed and in parallel ffs_ready_callback() is executing. ffs_ready_callback() checks config->enabled and tries to re-enumerate selected USB composition. This USB composition re-enumeration fails with error as: ffs_function_bind_config(): usb_add_function() fails (err:-19) for ffs android_bind_enabled_functions: ffs failed android_enable: usb_add_config failed : err: -19 enable_store: enable_store: android_enable failed Hence to avoid restarting of USB composition from ffs_ready_callaback() if dev is NULL. Change-Id: I92b7bf3e78ebcfe9195667229af67bc099ce0c9a Signed-off-by:Mayank Rana <mrana@codeaurora.org> Signed-off-by:
Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Loading
Please register or sign in to comment