forked from Minki/linux
ASoC: q6routing: initialize data correctly
Some of the router data fields are left as default zeros which are
valid dai ids, so initialize these to invalid value of -1.
Without intializing these correctly get_session_from_id() can return
incorrect session resulting in not closing the opened copp and messing
up with the copp ref count.
Fixes: e3a33673e8
("ASoC: qdsp6: q6routing: Add q6routing driver")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
d40e3e9e44
commit
7aa09ff243
@ -960,8 +960,10 @@ static int msm_routing_probe(struct snd_soc_component *c)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < MAX_SESSIONS; i++)
|
||||
for (i = 0; i < MAX_SESSIONS; i++) {
|
||||
routing_data->sessions[i].port_id = -1;
|
||||
routing_data->sessions[i].fedai_id = -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user