mwifiex: fix a reversed condition
Subsystems (2)
PATCH 1/1 mwifiex: fix a reversed condition
The NULL test here is reversed.
Fixes 7d7f07d8c5d3 ('mwifiex: add wowlan net-detect support')
Signed-off-by Dan Carpenter <[email protected]>
drivers/net/wireless/marvell/mwifiex/scan.c +1 -1
@@ -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 ;
Quoted 1 line · Dan Carpenter
The NULL test here is reversed.
[]
drivers/net/wireless/marvell/mwifiex/scan.c
Quoted 1 line
drivers/net/wireless/marvell/mwifiex/scan.c +0
-0
[]
Quoted 7 lines
drivers/net/wireless/marvell/mwifiex/scan.c +0
-0@@ -2196,7 +2196,7 @@ int mwifiex_ret_802_11_scan(struct mwifiex_private *priv,
pmatch = adapter->nd_info->matches[idx];drivers/net/wireless/marvell/mwifiex/scan.c +1
-1-if (!pmatch) { +if (pmatch) {
memset(pmatch, 0, sizeof(*pmatch));
As it's just been kzalloc'ed,
this memset seems unnecessary as well.
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Kalle Valo
AppliedQuoted 5 lines
The NULL test here is reversed.
Fixes 7d7f07d8c5d3 ('mwifiex: add wowlan net-detect support')Signed-off-by Dan Carpenter <[email protected]>
Thanks, applied to wireless-drivers-next.git.
Kalle Valo