linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Dan Carpenter <dan.carpenter@oracle.com>,
	Amitkumar Karwar <akarwar@marvell.com>,
	chunfan chen <jeffc@marvell.com>
Cc: Nishant Sarmukadam <nishants@marvell.com>,
	Kalle Valo <kvalo@codeaurora.org>,
	linux-wireless@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] mwifiex: fix a reversed condition
Date: Tue, 02 Feb 2016 06:33:05 -0800	[thread overview]
Message-ID: <1454423585.7291.16.camel@perches.com> (raw)
In-Reply-To: <20160202100005.GA3040@mwanda>

On Tue, 2016-02-02 at 13:00 +0300, Dan Carpenter wrote:
> The NULL test here is reversed.
[]
> diff --git a/drivers/net/wireless/marvell/mwifiex/scan.c b/drivers/net/wireless/marvell/mwifiex/scan.c
[]
> @@ -2196,7 +2196,7 @@ int mwifiex_ret_802_11_scan(struct mwifiex_private *priv,
>  
>  			pmatch = adapter->nd_info->matches[idx];
>  
> -			if (!pmatch) {
> +			if (pmatch) {
>  				memset(pmatch, 0, sizeof(*pmatch));

As it's just been kzalloc'ed,
this memset seems unnecessary as well.


  reply	other threads:[~2016-02-02 14:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-02 10:00 [patch] mwifiex: fix a reversed condition Dan Carpenter
2016-02-02 14:33 ` Joe Perches [this message]
2016-02-06 12:01 ` 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=1454423585.7291.16.camel@perches.com \
    --to=joe@perches.com \
    --cc=akarwar@marvell.com \
    --cc=dan.carpenter@oracle.com \
    --cc=jeffc@marvell.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=nishants@marvell.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).