mirror of
https://github.com/torvalds/linux.git
synced 2026-08-01 03:59:40 +02:00
rpmsg: glink: fix destroy channel endpoint logic
When rpmsg client driver destroys last channel endpoint, remove rpmsg device is triggered. In both cases (destroy endpoint and remove device) a glink close command sent to the remote peer. This change, when for removing rpmsg device endpoint already destroyed will avoid sending second glink close command. Change-Id: I0135e2626f4ede7a380308944f7c273d18e223bf Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
This commit is contained in:
parent
4e40649bf5
commit
0174e84b16
|
|
@ -1275,6 +1275,10 @@ static void qcom_glink_destroy_ept(struct rpmsg_endpoint *ept)
|
|||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&channel->recv_lock, flags);
|
||||
if (!channel->ept.cb) {
|
||||
spin_unlock_irqrestore(&channel->recv_lock, flags);
|
||||
return;
|
||||
}
|
||||
channel->ept.cb = NULL;
|
||||
spin_unlock_irqrestore(&channel->recv_lock, flags);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user