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>
This commit is contained in:
Sujith Manoharan 2014-10-07 10:14:36 +05:30 committed by John W. Linville
parent 79ee65659e
commit d2a993e20e
1 changed files with 4 additions and 4 deletions

View File

@ -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
printk("%sath: %pV", level, &vaf);
trace_ath_log(common->hw->wiphy, &vaf);
} else {
printk("%sath: %pV", level, &vaf);
}
va_end(args);
}