Commit 972562f7 authored by Srinivas Kandagatla's avatar Srinivas Kandagatla Committed by 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: default avatarSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: default avatarNiklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 2d12c20b
...@@ -310,7 +310,7 @@ int q6routing_stream_open(int fedai_id, int perf_mode, ...@@ -310,7 +310,7 @@ int q6routing_stream_open(int fedai_id, int perf_mode,
session->channels, topology, perf_mode, session->channels, topology, perf_mode,
session->bits_per_sample, 0, 0); session->bits_per_sample, 0, 0);
if (!copp) { if (IS_ERR_OR_NULL(copp)) {
mutex_unlock(&routing_data->lock); mutex_unlock(&routing_data->lock);
return -EINVAL; return -EINVAL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment