From: Chaehyun Lim Date: Fri, 29 Jan 2016 14:51:33 +0000 (+0900) Subject: staging: wilc1000: wilc_msgqueue: release semaphore in error path X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=8231dfc0879f8f0caecfcdc4b1ebae67cad6878d;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c index f57e4ec3c742..5fe85eb40146 100644 --- a/drivers/staging/wilc1000/wilc_msgqueue.c +++ b/drivers/staging/wilc1000/wilc_msgqueue.c @@ -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; }