msm: ipc_router: Avoid destroying and then accessing wakelocks

When a port is closed, receive wakelock of that port gets destroyed
before the port is removed from the internal table. This leads to
another thread accessing the wakelock of the port which is in the
middle of close operation. So remove the port from the internal table
and then destroy the corresponding wakelocks.

Change-Id: Iddc6e58658de55989a32410acf2cf007d2ba4a54
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
1 file changed