The idr_lock should be released in the case that we don't find the given
channel.
Fixes:
44f6df922a26 ("rpmsg: glink: Fix idr_lock from mutex to spinlock")
Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
spin_lock(&glink->idr_lock);
channel = idr_find(&glink->lcids, lcid);
+ spin_unlock(&glink->idr_lock);
if (!channel) {
dev_err(glink->dev, "Invalid open ack packet\n");
return -EINVAL;
}
- spin_unlock(&glink->idr_lock);
complete(&channel->open_ack);