All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 3/3] brcmfmac: Using zero instead of NULL
@ 2012-10-03  6:07 ` Dan Carpenter
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2012-10-03  6:07 UTC (permalink / raw)
  To: Brett Rudley
  Cc: Roland Vossen, Arend van Spriel, Franky (Zhenhui) Lin, Kan Yan,
	John W. Linville, Hante Meuleman, Pieter-Paul Giesberts,
	linux-wireless, brcm80211-dev-list, kernel-janitors

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.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
index ed83b54..9ddafc2 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
@@ -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;

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-10-04 18:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-03  6:07 [patch 3/3] brcmfmac: Using zero instead of NULL Dan Carpenter
2012-10-03  6:07 ` Dan Carpenter
2012-10-04 16:27 ` Arend van Spriel
2012-10-04 16:27   ` Arend van Spriel
2012-10-04 18:43   ` Dan Carpenter
2012-10-04 18:43     ` Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.