Search Linux Wireless

re: brcm80211: fmac: remove alignment check from brcmf_sdioh_request_buffer()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux