* [patch] mwifiex: fix a reversed condition
@ 2016-02-02 10:00 Dan Carpenter
2016-02-02 14:33 ` Joe Perches
2016-02-06 12:01 ` Kalle Valo
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2016-02-02 10:00 UTC (permalink / raw)
To: Amitkumar Karwar, chunfan chen
Cc: Nishant Sarmukadam, Kalle Valo, linux-wireless, kernel-janitors
The NULL test here is reversed.
Fixes: 7d7f07d8c5d3 ('mwifiex: add wowlan net-detect support')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/net/wireless/marvell/mwifiex/scan.c b/drivers/net/wireless/marvell/mwifiex/scan.c
index fc8d8ca..489f7a9 100644
--- 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));
if (chan_band_tlv) {
pmatch->n_channels = 1;
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [patch] mwifiex: fix a reversed condition
2016-02-02 10:00 [patch] mwifiex: fix a reversed condition Dan Carpenter
@ 2016-02-02 14:33 ` Joe Perches
2016-02-06 12:01 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Joe Perches @ 2016-02-02 14:33 UTC (permalink / raw)
To: Dan Carpenter, Amitkumar Karwar, chunfan chen
Cc: Nishant Sarmukadam, Kalle Valo, linux-wireless, kernel-janitors
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.
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: mwifiex: fix a reversed condition
2016-02-02 10:00 [patch] mwifiex: fix a reversed condition Dan Carpenter
2016-02-02 14:33 ` Joe Perches
@ 2016-02-06 12:01 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2016-02-06 12:01 UTC (permalink / raw)
To: Dan Carpenter
Cc: Amitkumar Karwar, chunfan chen, Nishant Sarmukadam,
linux-wireless, kernel-janitors
> The NULL test here is reversed.
>
> Fixes: 7d7f07d8c5d3 ('mwifiex: add wowlan net-detect support')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Thanks, applied to wireless-drivers-next.git.
Kalle Valo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-02-06 12:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-02 10:00 [patch] mwifiex: fix a reversed condition Dan Carpenter
2016-02-02 14:33 ` Joe Perches
2016-02-06 12:01 ` Kalle Valo
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).