Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d2a993e2 authored by Sujith Manoharan's avatar Sujith Manoharan Committed by John W. Linville
Browse files

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarSujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 79ee6565
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -79,13 +79,13 @@ void ath_printk(const char *level, const struct ath_common* common,
	vaf.fmt = fmt;
	vaf.fmt = fmt;
	vaf.va = &args;
	vaf.va = &args;


	if (common && common->hw && common->hw->wiphy)
	if (common && common->hw && common->hw->wiphy) {
		printk("%sath: %s: %pV",
		printk("%sath: %s: %pV",
		       level, wiphy_name(common->hw->wiphy), &vaf);
		       level, wiphy_name(common->hw->wiphy), &vaf);
	else
		printk("%sath: %pV", level, &vaf);

		trace_ath_log(common->hw->wiphy, &vaf);
		trace_ath_log(common->hw->wiphy, &vaf);
	} else {
		printk("%sath: %pV", level, &vaf);
	}


	va_end(args);
	va_end(args);
}
}