diff options
author | Colin Ian King <colin.king@canonical.com> | 2019-10-09 12:46:02 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-10-10 11:46:26 +0300 |
commit | 0bb0dff0cc16ac58e3f0123bda3035547da30d55 (patch) | |
tree | af74062c30fb392e7cbeef0351de5be3bf34e0c3 /drivers/staging/wfx/debug.c | |
parent | c0981afd8cd6e7176b4b9fe2186087695463ebde (diff) | |
download | linux-0bb0dff0cc16ac58e3f0123bda3035547da30d55.tar.xz |
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: 4f8b7fabb15d ("staging: wfx: allow to send commands to chip")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20191009094602.19663-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wfx/debug.c')
-rw-r--r-- | drivers/staging/wfx/debug.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/wfx/debug.c b/drivers/staging/wfx/debug.c index 8de16ad7c710..761ad9b4f27e 100644 --- a/drivers/staging/wfx/debug.c +++ b/drivers/staging/wfx/debug.c @@ -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); |