From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Date: Fri, 20 Jun 2014 21:02:04 +0300 Subject: [ath9k-devel] ath9k: Add channel context worker thread Message-ID: <20140620180204.GA12234@mwanda> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org 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