Skip to content

Commit

Permalink
ath: Fix smatch warning
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sujith Manoharan authored and John W. Linville committed Oct 7, 2014
1 parent 79ee656 commit d2a993e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/net/wireless/ath/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit d2a993e

Please sign in to comment.