Thread (3 messages) 3 messages, 3 authors, 2022-07-27

Re: [PATCH] wifi: wil6210: debugfs: fix uninitialized variable use in `wil_write_file_wmi()`

From: Kalle Valo <kvalo@kernel.org>
Date: 2022-07-27 10:20:52
Also in: linux-wireless, lkml, llvm, oe-kbuild-all

Ammar Faizi [off-list ref] wrote:
Commit 7a4836560a61 changes simple_write_to_buffer() with memdup_user()
but it forgets to change the value to be returned that came from
simple_write_to_buffer() call. It results in the following warning:

  warning: variable 'rc' is uninitialized when used here [-Wuninitialized]
           return rc;
                  ^~

Remove rc variable and just return the passed in length if the
memdup_user() succeeds.

Cc: Dan Carpenter <redacted>
Reported-by: kernel test robot <redacted>
Fixes: 7a4836560a6198d245d5732e26f94898b12eb760 ("wifi: wil6210: debugfs: fix info leak in wil_write_file_wmi()")
Fixes: ff974e4083341383d3dd4079e52ed30f57f376f0 ("wil6210: debugfs interface to send raw WMI command")
Signed-off-by: Ammar Faizi <redacted>
Reviewed-by: Dan Carpenter <redacted>
Signed-off-by: Kalle Valo <redacted>
Patch applied to ath-next branch of ath.git, thanks.

d578e0af3a00 wifi: wil6210: debugfs: fix uninitialized variable use in `wil_write_file_wmi()`

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20220724202452.61846-1-ammar.faizi@intel.com/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help