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

Commit 9ef0adec authored by Azhar Shaikh's avatar Azhar Shaikh
Browse files

USB: android: Increment disable_depth on usb_add_config() failure



When ADB is enabled, bind_config() callback should be called after
receiving functionfs_ready_callback(). This ensures stringtabs is
populated by __ffs_data_got_strings() before calling
bind_config() callback.
If usb_add_config() fails, then on next composition switch with ADB,
bind_config() callback will be called from enable_store() instead of
being called from functionfs_ready_callback(). This will lead to a crash
as stringtabs is not populated.
So, whenever usb_add_config() fails increment the disable_depth in
android_enable(), so as to avoid calling bind_config() callback from
enable_store().

CRs-fixed: 772342
Change-Id: I93065d2b59569518c33400381aac5cd6e5c7333a
Signed-off-by: default avatarAzhar Shaikh <azhars@codeaurora.org>
parent 04e700e7
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