diff options
Diffstat (limited to 'drivers/staging/wfx')
-rw-r--r-- | drivers/staging/wfx/debug.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/staging/wfx/debug.c b/drivers/staging/wfx/debug.c index 3261b267c385..8de16ad7c710 100644 --- a/drivers/staging/wfx/debug.c +++ b/drivers/staging/wfx/debug.c @@ -256,9 +256,8 @@ static ssize_t wfx_send_hif_msg_read(struct file *file, char __user *user_buf, return context->ret; // Be carefull, write() is waiting for a full message while read() // only return a payload - ret = copy_to_user(user_buf, context->reply, count); - if (ret) - return ret; + if (copy_to_user(user_buf, context->reply, count)) + return -EFAULT; return count; } |