Commit dee1bf76 authored by Chaehyun Lim's avatar Chaehyun Lim Committed by Greg Kroah-Hartman

staging: wilc1000: fix return error code

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: default avatarChaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bd07b007
...@@ -61,7 +61,7 @@ int wilc_mq_send(struct message_queue *mq, ...@@ -61,7 +61,7 @@ int wilc_mq_send(struct message_queue *mq,
if ((!mq) || (send_buf_size == 0) || (!send_buf)) { if ((!mq) || (send_buf_size == 0) || (!send_buf)) {
PRINT_ER("mq or send_buf is null\n"); PRINT_ER("mq or send_buf is null\n");
return -EFAULT; return -EINVAL;
} }
if (mq->exiting) { if (mq->exiting) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment