mwifiex: fix a reversed condition
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 2 Feb 2016 10:00:05 +0000 (13:00 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Sat, 6 Feb 2016 12:01:04 +0000 (14:01 +0200)
The NULL test here is reversed.

Fixes: 7d7f07d8c5d3 ('mwifiex: add wowlan net-detect support')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/marvell/mwifiex/scan.c

index fc8d8ca674532a9ac62503c9dbe3b092800c080f..489f7a911a83f225561a2ddf902c637457b6b960 100644 (file)
@@ -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;