diff options
author | Srinivas Kandagatla <srinivas.kandagatla@linaro.org> | 2018-06-26 12:20:15 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-06-26 17:41:38 +0300 |
commit | 972562f7aaaa261ec6e1ac14fed0c5bdd0dfb1cb (patch) | |
tree | ef6e1d33a309ed5e57140754cc1f7ffd55616316 /sound/soc/qcom | |
parent | 2d12c20b98ad610892151da37367f2d018181455 (diff) | |
download | linux-972562f7aaaa261ec6e1ac14fed0c5bdd0dfb1cb.tar.xz |
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: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/qcom')
-rw-r--r-- | sound/soc/qcom/qdsp6/q6routing.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/qcom/qdsp6/q6routing.c b/sound/soc/qcom/qdsp6/q6routing.c index ab696bf8d1d3..c80fdbc2442e 100644 --- a/sound/soc/qcom/qdsp6/q6routing.c +++ b/sound/soc/qcom/qdsp6/q6routing.c @@ -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; } |