diff options
author | Sujith Manoharan <c_manoha@qca.qualcomm.com> | 2014-10-07 10:14:36 +0530 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-10-07 14:48:37 -0400 |
commit | d2a993e20e717a4ccbfa9a58b29362e4446208a0 (patch) | |
tree | 563d1844a61d5dec5f7f2fa4f34fa04dc71d696a /drivers/net/wireless | |
parent | 79ee65659e116a49c81f63480a7672b7cbafa323 (diff) |
ath: Fix smatch warning
drivers/net/wireless/ath/main.c:88 ath_printk()
error: we previously assumed 'common->hw' could be null (see line 82)
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ath/main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/main.c b/drivers/net/wireless/ath/main.c index 83f47af19280..338d72337604 100644 --- a/drivers/net/wireless/ath/main.c +++ b/drivers/net/wireless/ath/main.c @@ -79,13 +79,13 @@ void ath_printk(const char *level, const struct ath_common* common, vaf.fmt = fmt; vaf.va = &args; - if (common && common->hw && common->hw->wiphy) + if (common && common->hw && common->hw->wiphy) { printk("%sath: %s: %pV", level, wiphy_name(common->hw->wiphy), &vaf); - else + trace_ath_log(common->hw->wiphy, &vaf); + } else { printk("%sath: %pV", level, &vaf); - - trace_ath_log(common->hw->wiphy, &vaf); + } va_end(args); } |