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

Skip to content
Commit 3ecc1a5c authored by Pratham Pratap's avatar Pratham Pratap
Browse files

sound: usb: Don't bail out if qmi_send_indication fails



Consider a scenario where ADSP SSR happened and USB headset
gets disconnected before ADSP is up then in uaudio_disconnect_cb,
qmi_send_indication will fail leading to return from the function.
Now the uaudio_qmi_bye_cb will get called since all clients from
the node are gone which in turn will call uaudio_qmi_disconnect_work.
This can lead to NULL pointer derefernce since snd_usb_audio got
freed and was accessed in uaudio_qmi_disconnect_work.

Fix this by not bailing out if qmi_send_indication which will
ensure that uaudio_qmi_disconnect_work will wait to be queued
until in_use is false.

Change-Id: Ie22fd0a8f4aa0e33b9aaf092b658476b8c47c199
Signed-off-by: default avatarPratham Pratap <prathampratap@codeaurora.org>
parent cf2cbb63
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