linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Arend van Spriel" <arend@broadcom.com>
To: "Dan Carpenter" <dan.carpenter@oracle.com>
Cc: "Brett Rudley" <brudley@broadcom.com>,
	"Roland Vossen" <rvossen@broadcom.com>,
	"Franky (Zhenhui) Lin" <frankyl@broadcom.com>,
	"Kan Yan" <kanyan@broadcom.com>,
	"John W. Linville" <linville@tuxdriver.com>,
	"Pieter-Paul Giesberts" <pieterpg@broadcom.com>,
	linux-wireless@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] brcm80211: remove an unneeded NULL check
Date: Tue, 15 May 2012 16:24:20 +0200	[thread overview]
Message-ID: <4FB26714.6020008@broadcom.com> (raw)
In-Reply-To: <20120514205729.GD20836@elgon.mountain>

On 05/14/2012 10:57 PM, Dan Carpenter wrote:
> This code causes a static checker warning because "pi" gets dereferenced
> before it is checked.  The dereference is inside the write_phy_reg()
> function which is called from wlc_phy_write_txmacreg_nphy().
> 
> This code is only called from wlc_phy_init_nphy() and "pi" is a
> valid pointer so we can remove the check for NULL.

Acked-by: Arend van Spriel <arend@broadcom.com>

> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_n.c b/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_n.c
> index 812b6e3..d6380f3 100644
> --- a/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_n.c
> +++ b/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_n.c
> @@ -14358,7 +14358,7 @@ void wlc_phy_nphy_tkip_rifs_war(struct brcms_phy *pi, u8 rifs)
>  
>  	wlc_phy_write_txmacreg_nphy(pi, holdoff, delay);
>  
> -	if (pi && pi->sh && (pi->sh->_rifs_phy != rifs))
> +	if (pi->sh && (pi->sh->_rifs_phy != rifs))
>  		pi->sh->_rifs_phy = rifs;
>  }
>  
> 



      reply	other threads:[~2012-05-15 14:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-14 20:57 [patch] brcm80211: remove an unneeded NULL check Dan Carpenter
2012-05-15 14:24 ` Arend van Spriel [this message]

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=4FB26714.6020008@broadcom.com \
    --to=arend@broadcom.com \
    --cc=brudley@broadcom.com \
    --cc=dan.carpenter@oracle.com \
    --cc=frankyl@broadcom.com \
    --cc=kanyan@broadcom.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=pieterpg@broadcom.com \
    --cc=rvossen@broadcom.com \
    /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).