From 6ab8ea49ffd42eb5251562b127cb3c10b1b9495e Mon Sep 17 00:00:00 2001 From: Anirudh Raghavendra Date: Mon, 10 Apr 2023 17:06:50 -0700 Subject: [PATCH] Fix issue in allocating multiple sessions for ADSP Multiple sessions were being allocated from ADSP using the shared context bank. Remove second for loop which was not checking for the sharedcb variable. Change-Id: Ie5831eb9454b909dfea62cffbdaf66d94b200b3b Signed-off-by: Anirudh Raghavendra --- dsp/adsprpc.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/dsp/adsprpc.c b/dsp/adsprpc.c index 414c505ca7..02ba2a2bb3 100644 --- a/dsp/adsprpc.c +++ b/dsp/adsprpc.c @@ -5389,15 +5389,6 @@ static int fastrpc_session_alloc_locked(struct fastrpc_channel_ctx *chan, break; } } - if (idx >= chan->sesscount) { - for (idx = 0; idx < chan->sesscount; ++idx) { - if (!chan->session[idx].used && - chan->session[idx].smmu.secure == secure) { - chan->session[idx].used = 1; - break; - } - } - } if (idx >= chan->sesscount) { err = -EUSERS; goto bail;