sound: usb: usb_audio_qmi_svc: Set QMI return status correctly on error
In some of the exit early conditions, the ret value is not overridden with an error code. This would lead to a condition where the QMI response status would be zero (success), while other fields are not properly populated. The error condition in question is: uaudio_err("invalid substream\n"); Address this by setting the ret value manually in case of an error condition. This would allow for the audio DSP to treat the QMI response as a failure versus attempting to continue processing it. The issue was seen if the audio device is disconnected shortly after attempting to start the audio session. Change-Id: Ibf4198bb15ba490f665accba2f8459cfc4810b34 Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com> Signed-off-by: Udipto Goswami <quic_ugoswami@quicinc.com>
This commit is contained in:
parent
44d96b8531
commit
3488d3d84c
@ -1569,6 +1569,7 @@ static void handle_uaudio_stream_req(struct qmi_handle *handle,
|
||||
|
||||
if (!subs) {
|
||||
uaudio_err("invalid substream\n");
|
||||
ret = -EINVAL;
|
||||
goto response;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user