mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-15 15:26:41 +07: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:
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user