Commit 0bb0dff0 authored by Colin Ian King's avatar Colin Ian King Committed by Greg Kroah-Hartman

staging: wfx: fix swapped arguments in memset call

The memset appears to have the 2nd and 3rd arguments in the wrong
order, fix this by swapping these around into the correct order.

Addresses-Coverity: ("Memset fill truncated")
Fixes: 4f8b7fab ("staging: wfx: allow to send commands to chip")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Reviewed-by: default avatarJérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20191009094602.19663-1-colin.king@canonical.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c0981afd
......@@ -226,7 +226,7 @@ static ssize_t wfx_send_hif_msg_write(struct file *file, const char __user *user
// wfx_cmd_send() chekc that reply buffer is wide enough, but do not
// return precise length read. User have to know how many bytes should
// be read. Filling reply buffer with a memory pattern may help user.
memset(context->reply, sizeof(context->reply), 0xFF);
memset(context->reply, 0xFF, sizeof(context->reply));
request = memdup_user(user_buf, count);
if (IS_ERR(request))
return PTR_ERR(request);
......
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