linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: arend@broadcom.com
Cc: linux-wireless@vger.kernel.org
Subject: re: brcm80211: fmac: remove alignment check from brcmf_sdioh_request_buffer()
Date: Tue, 29 Nov 2011 17:52:47 +0300	[thread overview]
Message-ID: <20111129145247.GA7152@elgon.mountain> (raw)


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


                 reply	other threads:[~2011-11-29 14:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111129145247.GA7152@elgon.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=arend@broadcom.com \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).