public inbox for [email protected]
 help / color / mirror / Atom feed
From: Dan Carpenter <[email protected]>
To: Ammar Faizi <[email protected]>
Cc: Kalle Valo <[email protected]>,
	Kalle Valo <[email protected]>,
	Eric Dumazet <[email protected]>,
	Jakub Kicinski <[email protected]>, Paolo Abeni <[email protected]>,
	Johannes Berg <[email protected]>,
	Linux Wireless Mailing List <[email protected]>,
	netdev Mailing List <[email protected]>,
	Linux Kernel Mailing List <[email protected]>,
	GNU/Weeb Mailing List <[email protected]>,
	[email protected], [email protected],
	kernel test robot <[email protected]>
Subject: Re: [PATCH] wifi: wil6210: debugfs: fix uninitialized variable use in `wil_write_file_wmi()`
Date: Mon, 25 Jul 2022 09:34:10 +0300	[thread overview]
Message-ID: <20220725063410.GO2316@kadam> (raw)
In-Reply-To: <[email protected]>

On Mon, Jul 25, 2022 at 03:26:18AM +0700, Ammar Faizi 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 <[email protected]>
> Reported-by: kernel test robot <[email protected]>
> 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 <[email protected]>

Oops.  Sorry!

Reviewed-by: Dan Carpenter <[email protected]>

regards,
dan carpenter


  reply	other threads:[~2022-07-25  6:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-24 19:44 [ammarfaizi2-block:kvalo/ath/pending 3/9] drivers/net/wireless/ath/wil6210/debugfs.c:1030:9: warning: variable 'rc' is uninitialized when used here kernel test robot
2022-07-24 20:26 ` [PATCH] wifi: wil6210: debugfs: fix uninitialized variable use in `wil_write_file_wmi()` Ammar Faizi
2022-07-25  6:34   ` Dan Carpenter [this message]
2022-07-27 10:20   ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220725063410.GO2316@kadam \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox