brcmfmac: Using zero instead of NULL
Subsystems (2)
PATCH 3/3 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.
drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c +1 -1
@@ -3973,7 +3973,7 @@ brcmf_set_management_ie(struct brcmf_cfg80211_info *cfg,u8 *curr_ie_buf;u8 *mgmt_ie_buf =NULL ;int mgmt_ie_buf_len; -u32 *mgmt_ie_len =0 ; +u32 *mgmt_ie_len;u32 del_add_ie_buf_len =0 ;u32 total_ie_buf_len =0 ;u32 parsed_ie_buf_len =0 ;
Quoted 4 lines · Dan Carpenter
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.
We already had it fixed internally, but your change is more sensible. I had it reviewed internally and plan to send it to John for 3.8 (ie. wireless-next after merge window). Let me know if that is ok with you.
Gr. AvS
Quoted 10 lines · Arend van Spriel
Quoted 4 lines · Dan Carpenter
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.
We already had it fixed internally, but your change is more sensible. I had it reviewed internally and plan to send it to John for 3.8 (ie. wireless-next after merge window). Let me know if that is ok with you.
Sounds good.
regards,
dan carpenter