Commit 8231dfc0 authored by Chaehyun Lim's avatar Chaehyun Lim Committed by Greg Kroah-Hartman

staging: wilc1000: wilc_msgqueue: release semaphore in error path

It should be called up(&mq->sem) to release semaphore before returning
error codes as -EFAULT when list is empty.
Signed-off-by: default avatarChaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e9670aba
......@@ -126,6 +126,7 @@ int wilc_mq_recv(struct message_queue *mq,
if (list_empty(&mq->msg_list)) {
spin_unlock_irqrestore(&mq->lock, flags);
up(&mq->sem);
PRINT_ER("msg is null\n");
return -EFAULT;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment