* [ath9k-devel] ath9k: Add channel context worker thread
@ 2014-06-20 18:02 Dan Carpenter
2014-06-21 3:41 ` Manoharan, Rajkumar
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2014-06-20 18:02 UTC (permalink / raw)
To: ath9k-devel
Hello Felix Fietkau,
This is a semi-automatic email about new static checker warnings.
The patch bff117669841: "ath9k: Add channel context worker thread"
from Jun 11, 2014, leads to the following Smatch complaint:
drivers/net/wireless/ath/ath9k/main.c:323 ath_reset_internal()
error: we previously assumed 'hchan' could be null (see line 317)
drivers/net/wireless/ath/ath9k/main.c
316
317 if (hchan) {
^^^^^
Patch introduces a new check for NULL.
318 spin_lock_bh(&sc->chan_lock);
319 sc->cur_chandef = sc->cur_chan->chandef;
320 spin_unlock_bh(&sc->chan_lock);
321 }
322
323 ath_dbg(common, CONFIG, "Reset to %u MHz, HT40: %d fastcc: %d\n",
324 hchan->channel, IS_CHAN_HT40(hchan), fastcc);
^^^^^^^^^^^^^^
But the debug code dereferences hchan unconditionally.
325
regards,
dan carpenter
^ permalink raw reply [flat|nested] 2+ messages in thread
* [ath9k-devel] ath9k: Add channel context worker thread
2014-06-20 18:02 [ath9k-devel] ath9k: Add channel context worker thread Dan Carpenter
@ 2014-06-21 3:41 ` Manoharan, Rajkumar
0 siblings, 0 replies; 2+ messages in thread
From: Manoharan, Rajkumar @ 2014-06-21 3:41 UTC (permalink / raw)
To: ath9k-devel
Hi Dan,
Fix is already submitted for upstream. Checking hchan for NULL is not necessary as it never be null at line 317.
http://marc.info/?l=linux-wireless&m=140328462015155&w=2
-Rajkumar
________________________________________
From: ath9k-devel-bounces@lists.ath9k.org [ath9k-devel-bounces at lists.ath9k.org] on behalf of Dan Carpenter [dan.carpenter at oracle.com]
Sent: Friday, June 20, 2014 11:32 PM
To: nbd at openwrt.org
Cc: ath9k-devel at venema.h4ckr.net
Subject: Re: [ath9k-devel] ath9k: Add channel context worker thread
Hello Felix Fietkau,
This is a semi-automatic email about new static checker warnings.
The patch bff117669841: "ath9k: Add channel context worker thread"
from Jun 11, 2014, leads to the following Smatch complaint:
drivers/net/wireless/ath/ath9k/main.c:323 ath_reset_internal()
error: we previously assumed 'hchan' could be null (see line 317)
drivers/net/wireless/ath/ath9k/main.c
316
317 if (hchan) {
^^^^^
Patch introduces a new check for NULL.
318 spin_lock_bh(&sc->chan_lock);
319 sc->cur_chandef = sc->cur_chan->chandef;
320 spin_unlock_bh(&sc->chan_lock);
321 }
322
323 ath_dbg(common, CONFIG, "Reset to %u MHz, HT40: %d fastcc: %d\n",
324 hchan->channel, IS_CHAN_HT40(hchan), fastcc);
^^^^^^^^^^^^^^
But the debug code dereferences hchan unconditionally.
325
regards,
dan carpenter
_______________________________________________
ath9k-devel mailing list
ath9k-devel at lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-06-21 3:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-20 18:02 [ath9k-devel] ath9k: Add channel context worker thread Dan Carpenter
2014-06-21 3:41 ` Manoharan, Rajkumar
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.