staging: wilc1000: fix return error code
authorChaehyun Lim <chaehyun.lim@gmail.com>
Thu, 21 Jan 2016 11:30:49 +0000 (20:30 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Feb 2016 23:21:18 +0000 (15:21 -0800)
Three argument are checked at the beginning of wilc_mq_send whether
they are valid arguments or not. It is correct to use return error code
as -EINVAL, not -EFAULT.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/wilc_msgqueue.c

index 764723f999960c64aa78726c897e77fe46b39853..361ca8fbac31e0fa323d2c2b2d63ac2e06776431 100644 (file)
@@ -61,7 +61,7 @@ int wilc_mq_send(struct message_queue *mq,
 
        if ((!mq) || (send_buf_size == 0) || (!send_buf)) {
                PRINT_ER("mq or send_buf is null\n");
-               return -EFAULT;
+               return -EINVAL;
        }
 
        if (mq->exiting) {