提交 dc7bdbf1 编写于 作者: A Arend van Spriel 提交者: 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: NDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: NHante Meuleman <meuleman@broadcom.com>
Reviewed-by: NPiotr Haber <phaber@broadcom.com>
Signed-off-by: NArend van Spriel <arend@broadcom.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 5cfd6e88
......@@ -3059,9 +3059,9 @@ brcmf_cfg80211_sched_scan_start(struct wiphy *wiphy,
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",
request ? request->n_ssids : 0);
request->n_ssids);
return -EINVAL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册