linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* re: brcm80211: fmac: remove alignment check from brcmf_sdioh_request_buffer()
@ 2011-11-29 14:52 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2011-11-29 14:52 UTC (permalink / raw)
  To: arend; +Cc: linux-wireless


Hello Arend van Spriel,

This is a semi-automatic email about new static checker warnings.

The patch 8054321b7cb8: "brcm80211: fmac: remove alignment check from 
brcmf_sdioh_request_buffer()" from Nov 22, 2011, leads to the 
following Smatch complaint:

drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c +298 brcmf_sdioh_request_buffer()
	 warn: variable dereferenced before check 'pkt' (see line 293)

drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c
   292		int status;
   293		uint pkt_len = pkt->len;
                               ^^^^^^^^
New dereference.

   294		bool fifo = (fix_inc == SDIOH_DATA_FIX);
   295	
   296		brcmf_dbg(TRACE, "Enter\n");
   297	
   298		if (pkt == NULL)
                    ^^^^^^^^^^^
Old check.  Probably the check can be removed.  It from a quick glance
that this function is called from three places and pkt is always a valid
pointer.

   299			return -EINVAL;
   300	

regards,
dan carpenter


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-11-29 14:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-29 14:52 brcm80211: fmac: remove alignment check from brcmf_sdioh_request_buffer() Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).