public inbox for b43-dev@lists.infradead.org
 help / color / mirror / Atom feed
* b43: N-PHY: add overriding RF control for rev7+
       [not found] <20120809141539.GA15153@elgon.mountain>
@ 2012-08-09 14:18 ` Dan Carpenter
  2012-08-09 14:23   ` Rafał Miłecki
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2012-08-09 14:18 UTC (permalink / raw)
  To: b43-dev

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* b43: N-PHY: add overriding RF control for rev7+
  2012-08-09 14:18 ` b43: N-PHY: add overriding RF control for rev7+ Dan Carpenter
@ 2012-08-09 14:23   ` Rafał Miłecki
  0 siblings, 0 replies; 2+ messages in thread
From: Rafał Miłecki @ 2012-08-09 14:23 UTC (permalink / raw)
  To: b43-dev

2012/8/9 Dan Carpenter <dan.carpenter@oracle.com>:
> 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.

I failed at that, thanks!

-- 
Rafa?

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-08-09 14:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20120809141539.GA15153@elgon.mountain>
2012-08-09 14:18 ` b43: N-PHY: add overriding RF control for rev7+ Dan Carpenter
2012-08-09 14:23   ` Rafał Miłecki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox