netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Igor Mitsyanko <imitsyanko@quantenna.com>,
	Igor Mitsyanko <igor.mitsyanko.os@quantenna.com>,
	Avinash Patil <avinashp@quantenna.com>,
	Sergey Matyukevich <smatyukevich@quantenna.com>,
	Kalle Valo <kvalo@codeaurora.org>,
	"David S. Miller" <davem@davemloft.net>,
	Andrey Shevchenko <ashevchenko@quantenna.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] qtnfmac: avoid uninitialized variable access
Date: Tue, 9 Oct 2018 20:25:16 +0000	[thread overview]
Message-ID: <20181009202507.xs5bcaq5pi4zcps3@bars> (raw)
In-Reply-To: <20181009155757.494212-1-arnd@arndb.de>

Hello Arnd,

> When qtnf_trans_send_cmd_with_resp() fails, we have not yet initialized
> 'resp', as pointed out by a valid gcc warning:
> 
> drivers/net/wireless/quantenna/qtnfmac/commands.c: In function 'qtnf_cmd_send_with_reply':
> drivers/net/wireless/quantenna/qtnfmac/commands.c:133:54: error: 'resp' may be used uninitialized in this function [-Werror=maybe-uninitialized]
> 
> Since 'resp_skb' is also not set here, we can skip all further
> processing and just print the warning and return the failure code.
> 
> Fixes: c6ed298ffe09 ("qtnfmac: cleanup and unify command error handling")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Thanks for the patch! And for reminding me that I forgot to enable
gcc warnings in CI builds in addition to sparse checks.

Reviewed-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com>

Regards,
Sergey

  reply	other threads:[~2018-10-09 20:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-09 15:57 [PATCH] qtnfmac: avoid uninitialized variable access Arnd Bergmann
2018-10-09 20:25 ` Sergey Matyukevich [this message]
2018-10-10 14:56   ` Sergey Matyukevich
2018-10-11  8:08     ` 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=20181009202507.xs5bcaq5pi4zcps3@bars \
    --to=sergey.matyukevich.os@quantenna.com \
    --cc=arnd@arndb.de \
    --cc=ashevchenko@quantenna.com \
    --cc=avinashp@quantenna.com \
    --cc=davem@davemloft.net \
    --cc=igor.mitsyanko.os@quantenna.com \
    --cc=imitsyanko@quantenna.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=smatyukevich@quantenna.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;
as well as URLs for NNTP newsgroup(s).