diff options
author | Mark Brown <broonie@kernel.org> | 2018-08-08 19:32:10 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-08-08 19:32:10 +0300 |
commit | 35ef57a4190d4253b73720cf0402158eda0f1bc8 (patch) | |
tree | f7346839cbfe76beb8c09a6f0f6c5012cc28cff8 /sound/soc/qcom/qdsp6/q6afe-dai.c | |
parent | 0a047f07525fecfa8f6fccc5d30afff7e816de8d (diff) | |
parent | 0717edbdfed61b4c1e8291140f78882d3a481042 (diff) | |
download | linux-35ef57a4190d4253b73720cf0402158eda0f1bc8.tar.xz |
Merge branch 'asoc-4.18' into asoc-4.19 wmadsp dep
Diffstat (limited to 'sound/soc/qcom/qdsp6/q6afe-dai.c')
-rw-r--r-- | sound/soc/qcom/qdsp6/q6afe-dai.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/soc/qcom/qdsp6/q6afe-dai.c b/sound/soc/qcom/qdsp6/q6afe-dai.c index 139d24be3fb9..60ff4a2d3577 100644 --- a/sound/soc/qcom/qdsp6/q6afe-dai.c +++ b/sound/soc/qcom/qdsp6/q6afe-dai.c @@ -313,6 +313,9 @@ static void q6afe_dai_shutdown(struct snd_pcm_substream *substream, struct q6afe_dai_data *dai_data = dev_get_drvdata(dai->dev); int rc; + if (!dai_data->is_port_started[dai->id]) + return; + rc = q6afe_port_stop(dai_data->port[dai->id]); if (rc < 0) dev_err(dai->dev, "fail to close AFE port (%d)\n", rc); @@ -1332,7 +1335,7 @@ static void of_q6afe_parse_dai_data(struct device *dev, int id, i, num_lines; ret = of_property_read_u32(node, "reg", &id); - if (ret || id > AFE_PORT_MAX) { + if (ret || id < 0 || id >= AFE_PORT_MAX) { dev_err(dev, "valid dai id not found:%d\n", ret); continue; } |