Commit dc7bdbf1 authored by Arend van Spriel's avatar Arend van Spriel Committed by John W. Linville

brcmfmac: remove null-pointer check in .sched_scan_start() callback

In brcmf_cfg80211_sched_scan_start() the request parameter was checked
for being non-null. However, it never is so remove the check which gets
rid of following smatch warning:

drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c:2904
brcmf_cfg80211_sched_scan_start()
warn: variable dereferenced before check 'request' (see line 2897)
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarHante Meuleman <meuleman@broadcom.com>
Reviewed-by: default avatarPiotr Haber <phaber@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 5cfd6e88
...@@ -3059,9 +3059,9 @@ brcmf_cfg80211_sched_scan_start(struct wiphy *wiphy, ...@@ -3059,9 +3059,9 @@ brcmf_cfg80211_sched_scan_start(struct wiphy *wiphy,
return -EAGAIN; return -EAGAIN;
} }
if (!request || !request->n_ssids || !request->n_match_sets) { if (!request->n_ssids || !request->n_match_sets) {
brcmf_err("Invalid sched scan req!! n_ssids:%d\n", brcmf_err("Invalid sched scan req!! n_ssids:%d\n",
request ? request->n_ssids : 0); request->n_ssids);
return -EINVAL; return -EINVAL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment