Commit 81118d16 authored by Dan Carpenter's avatar Dan Carpenter Committed by John W. Linville

brcmfmac: Using zero instead of NULL

Sparse complains that we use zero instead of NULL here.  In fact, the
initialization is wrong and should be removed.  Doing these kinds of
bogus initializations means that GCC can't detect unitialized variables
and leads to bugs.
Reported-by: default avatarFengguang Wu <fengguang.wu@intel.com>
Reviewed-by: default avatarHante Meuleman <meuleman@broadcom.com>
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarFranky Lin <frankyl@broadcom.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 424749c7
...@@ -3972,8 +3972,8 @@ brcmf_set_management_ie(struct brcmf_cfg80211_info *cfg, ...@@ -3972,8 +3972,8 @@ brcmf_set_management_ie(struct brcmf_cfg80211_info *cfg,
u8 *iovar_ie_buf; u8 *iovar_ie_buf;
u8 *curr_ie_buf; u8 *curr_ie_buf;
u8 *mgmt_ie_buf = NULL; u8 *mgmt_ie_buf = NULL;
u32 mgmt_ie_buf_len = 0; u32 mgmt_ie_buf_len;
u32 *mgmt_ie_len = 0; u32 *mgmt_ie_len;
u32 del_add_ie_buf_len = 0; u32 del_add_ie_buf_len = 0;
u32 total_ie_buf_len = 0; u32 total_ie_buf_len = 0;
u32 parsed_ie_buf_len = 0; u32 parsed_ie_buf_len = 0;
...@@ -3995,8 +3995,7 @@ brcmf_set_management_ie(struct brcmf_cfg80211_info *cfg, ...@@ -3995,8 +3995,7 @@ brcmf_set_management_ie(struct brcmf_cfg80211_info *cfg,
case VNDR_IE_PRBRSP_FLAG: case VNDR_IE_PRBRSP_FLAG:
mgmt_ie_buf = cfg->ap_info->probe_res_ie; mgmt_ie_buf = cfg->ap_info->probe_res_ie;
mgmt_ie_len = &cfg->ap_info->probe_res_ie_len; mgmt_ie_len = &cfg->ap_info->probe_res_ie_len;
mgmt_ie_buf_len = mgmt_ie_buf_len = sizeof(cfg->ap_info->probe_res_ie);
sizeof(cfg->ap_info->probe_res_ie);
break; break;
case VNDR_IE_BEACON_FLAG: case VNDR_IE_BEACON_FLAG:
mgmt_ie_buf = cfg->ap_info->beacon_ie; mgmt_ie_buf = cfg->ap_info->beacon_ie;
......
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