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
Manoharan
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: [email protected] [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