Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
	}