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: Pratham Pratap <prathampratap@codeaurora.org>
1 file changed