diff options
| author | 2016-01-29 23:51:33 +0900 | |
|---|---|---|
| committer | 2016-02-03 15:33:09 -0800 | |
| commit | 8231dfc0879f8f0caecfcdc4b1ebae67cad6878d (patch) | |
| tree | 52ee869e96e639ed8900e1b3fde16247db2c6285 | |
| parent | staging: wilc1000: wilc_msgqueue: use standard struct list_head (diff) | |
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>
| -rw-r--r-- | drivers/staging/wilc1000/wilc_msgqueue.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; } |
