brcmfmac: remove bogus check in scheduled scan result handler
authorArend Van Spriel <arend.vanspriel@broadcom.com>
Thu, 6 Apr 2017 12:14:41 +0000 (13:14 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 13 Apr 2017 14:07:23 +0000 (17:07 +0300)
Checking whether the address of an array element is null is bogus
so removing it.

Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c

index 760781f4abd24ebc03981cff89df25c9fcbe4df4..b687533e5c2805c8c47b8a89eb5e2a92a4475aa3 100644 (file)
@@ -3344,12 +3344,6 @@ brcmf_notify_sched_scan_results(struct brcmf_if *ifp,
 
        for (i = 0; i < result_count; i++) {
                netinfo = &netinfo_start[i];
-               if (!netinfo) {
-                       brcmf_err("Invalid netinfo ptr. index: %d\n",
-                                 i);
-                       err = -EINVAL;
-                       goto out_err;
-               }
 
                if (netinfo->SSID_len > IEEE80211_MAX_SSID_LEN)
                        netinfo->SSID_len = IEEE80211_MAX_SSID_LEN;