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>
Dieser Commit ist enthalten in:
Anirudh Raghavendra
2023-04-10 17:06:50 -07:00
Ursprung 21968b8049
Commit 6ab8ea49ff

Datei anzeigen

@@ -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;