public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Amitkumar Karwar <amit.karwar@redpinesignals.com>,
	Prameela Rani Garnepudi <prameela.j04cs@gmail.com>,
	Siva Rebbagondla <siva.rebbagondla@redpinesignals.com>,
	Karun Eagalapati <karun256@gmail.com>,
	linux-wireless@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] rsi: Uninitialized return value in rsi_reset_card()
Date: Fri, 27 Apr 2018 12:14:33 +0000	[thread overview]
Message-ID: <87604calsm.fsf@purkki.adurom.net> (raw)
In-Reply-To: <20180426144235.GA25897@mwanda> (Dan Carpenter's message of "Thu, 26 Apr 2018 17:42:35 +0300")

Dan Carpenter <dan.carpenter@oracle.com> writes:

> If rsi_usb_master_reg_write() fails then "ret" hasn't been initialized.
>
> Fixes: 16d3bb7b2f37 ("rsi: disable fw watchdog timer during reset")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/net/wireless/rsi/rsi_91x_usb.c b/drivers/net/wireless/rsi/rsi_91x_usb.c
> index b065438f51b2..6ce6b754df12 100644
> --- a/drivers/net/wireless/rsi/rsi_91x_usb.c
> +++ b/drivers/net/wireless/rsi/rsi_91x_usb.c
> @@ -687,9 +687,10 @@ static int rsi_reset_card(struct rsi_hw *adapter)
>  	 */
>  	msleep(100);
>  
> -	if (rsi_usb_master_reg_write(adapter, SWBL_REGOUT,
> -				     RSI_FW_WDT_DISABLE_REQ,
> -				     RSI_COMMON_REG_SIZE) < 0) {
> +	ret = rsi_usb_master_reg_write(adapter, SWBL_REGOUT,
> +				       RSI_FW_WDT_DISABLE_REQ,
> +				       RSI_COMMON_REG_SIZE);
> +	if (ret < 0) {

Odd, I thought I replied to this one already but I don't see my mail on
patchwork. Anyway, Gustavo already submitted an identical patch:

https://patchwork.kernel.org/patch/10365985/

-- 
Kalle Valo

      reply	other threads:[~2018-04-27 12:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-26 14:42 [PATCH] rsi: Uninitialized return value in rsi_reset_card() Dan Carpenter
2018-04-27 12:14 ` Kalle Valo [this message]

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=87604calsm.fsf@purkki.adurom.net \
    --to=kvalo@codeaurora.org \
    --cc=amit.karwar@redpinesignals.com \
    --cc=dan.carpenter@oracle.com \
    --cc=karun256@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=prameela.j04cs@gmail.com \
    --cc=siva.rebbagondla@redpinesignals.com \
    /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