diff options
| author | Chaehyun Lim <chaehyun.lim@gmail.com> | 2016-01-29 17:51:33 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-04 02:33:09 +0300 |
| commit | 8231dfc0879f8f0caecfcdc4b1ebae67cad6878d (patch) | |
| tree | 52ee869e96e639ed8900e1b3fde16247db2c6285 | |
| parent | e9670aba93bce75cd6dc78010a8548da793ef1bb (diff) | |
| download | linux-8231dfc0879f8f0caecfcdc4b1ebae67cad6878d.tar.xz | |
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; } |
