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 <quic_araghave@quicinc.com>
This commit is contained in:
Anirudh Raghavendra
2023-04-10 17:06:50 -07:00
parent 21968b8049
commit 6ab8ea49ff

View File

@@ -5389,15 +5389,6 @@ static int fastrpc_session_alloc_locked(struct fastrpc_channel_ctx *chan,
break; 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) { if (idx >= chan->sesscount) {
err = -EUSERS; err = -EUSERS;
goto bail; goto bail;