mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 03:10:30 -04:00
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: Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
e9670aba93
commit
8231dfc087
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user