projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0a27047
)
ASoC: qdsp6: q6routing: validate port id before setting up route
author
Srinivas Kandagatla
<srinivas.kandagatla@linaro.org>
Tue, 16 Nov 2021 11:47:21 +0000
(11:47 +0000)
committer
Mark Brown
<broonie@kernel.org>
Tue, 16 Nov 2021 14:29:49 +0000
(14:29 +0000)
Validate port id before it starts sending commands to dsp this would
make error handling simpler.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link:
https://lore.kernel.org/r/20211116114721.12517-6-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/qcom/qdsp6/q6routing.c
patch
|
blob
|
history
diff --git
a/sound/soc/qcom/qdsp6/q6routing.c
b/sound/soc/qcom/qdsp6/q6routing.c
index 243b8179e59df59f4f8bf4ec182dcbf5dd268ed2..cd74681e811e1fb6fae0d3e8593fd0de39c1a456 100644
(file)
--- a/
sound/soc/qcom/qdsp6/q6routing.c
+++ b/
sound/soc/qcom/qdsp6/q6routing.c
@@
-372,6
+372,12
@@
int q6routing_stream_open(int fedai_id, int perf_mode,
}
session = &routing_data->sessions[stream_id - 1];
+ if (session->port_id < 0) {
+ dev_err(routing_data->dev, "Routing not setup for MultiMedia%d Session\n",
+ session->fedai_id);
+ return -EINVAL;
+ }
+
pdata = &routing_data->port_data[session->port_id];
mutex_lock(&routing_data->lock);