未验证 提交 972562f7 编写于 作者: S Srinivas Kandagatla 提交者: Mark Brown

ASoC: qdsp6: q6routing: add proper error check

q6adm_open can return error pointer or a null in error cases.
Fix the return handling.
Signed-off-by: NSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: NNiklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 2d12c20b
......@@ -310,7 +310,7 @@ int q6routing_stream_open(int fedai_id, int perf_mode,
session->channels, topology, perf_mode,
session->bits_per_sample, 0, 0);
if (!copp) {
if (IS_ERR_OR_NULL(copp)) {
mutex_unlock(&routing_data->lock);
return -EINVAL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册