From: Dan Carpenter <dan.carpenter@oracle.com>
To: b43-dev@lists.infradead.org
Subject: b43: N-PHY: add overriding RF control for rev7+
Date: Thu, 9 Aug 2012 17:18:26 +0300 [thread overview]
Message-ID: <20120809141826.GE3734@mwanda> (raw)
In-Reply-To: <20120809141539.GA15153@elgon.mountain>
On Thu, Aug 09, 2012 at 05:15:39PM +0300, Dan Carpenter wrote:
> Hello Rafa? Mi?ecki,
>
> This is a semi-automatic email about new static checker warnings.
>
> The patch c071b9f666be: "b43: N-PHY: add overriding RF control for
> rev7+" from Jul 26, 2012, leads to the following Smatch complaint:
>
> drivers/net/wireless/b43/phy_n.c:158 b43_nphy_rf_control_override_rev7()
> warn: variable dereferenced before check 'e' (see line 154)
>
> drivers/net/wireless/b43/phy_n.c
> 153
> 154 val_addr = (i == 0) ? e->val_addr_core0 : e->val_addr_core1;
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> New dereferences.
>
> 155
> 156 if (off) {
> 157 b43_phy_mask(dev, en_addr, ~en_mask);
> 158 if (e) /* Do it safer, better than wl */
> ^^^
> New check.
>
> 159 b43_phy_mask(dev, val_addr, ~e->val_mask);
> 160 } else {
>
There is a second NULL check a couple lines down as well.
regards,
dan carpenter
next parent reply other threads:[~2012-08-09 14:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20120809141539.GA15153@elgon.mountain>
2012-08-09 14:18 ` Dan Carpenter [this message]
2012-08-09 14:23 ` b43: N-PHY: add overriding RF control for rev7+ Rafał Miłecki
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=20120809141826.GE3734@mwanda \
--to=dan.carpenter@oracle.com \
--cc=b43-dev@lists.infradead.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