提交 b07868bd 编写于 作者: V Vaibhav Agarwal 提交者: Greg Kroah-Hartman

greybus: audio: return success for stop trigger if device removed

In case GB codec module is already removed, no action is required
at the HW level. Thus, report SUCCESS to above layer.

Reporting error to above layer will cause repeated trials and won't
allow to update DPCM connections.
Signed-off-by: NVaibhav Agarwal <vaibhav.agarwal@linaro.org>
Reviewed-by: NMark Greer <mgreer@animalcreek.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
上级 29386f05
......@@ -362,6 +362,10 @@ static int gbcodec_trigger(struct snd_pcm_substream *substream, int cmd,
dev_err(dai->dev, "%d:Error during %s stream\n", ret,
start ? "Start" : "Stop");
/* in case device removed, return 0 for stop trigger */
if (stop && (ret == -ENODEV))
ret = 0;
func_exit:
mutex_unlock(&gb->lock);
return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册