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

Commit ef6c7d3c authored by Xinming Hu's avatar Xinming Hu Committed by Kalle Valo
Browse files

mwifiex: fall back mwifiex_dbg to pr_info when adapter->dev not set



mwifiex_dbg will do nothing before adapter->dev get assigned. several logs
lost in this case. it can be avoided by fall back to pr_info.

Signed-off-by: default avatarXinming Hu <huxm@marvell.com>
Reviewed-by: default avatarBrian Norris <briannorris@chromium.org>
Reviewed-by: default avatarDmitry Torokhov <dtor@chromium.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 625b4dba
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -1753,7 +1753,7 @@ void _mwifiex_dbg(const struct mwifiex_adapter *adapter, int mask,
	struct va_format vaf;
	va_list args;

	if (!adapter->dev || !(adapter->debug_mask & mask))
	if (!(adapter->debug_mask & mask))
		return;

	va_start(args, fmt);
@@ -1761,7 +1761,10 @@ void _mwifiex_dbg(const struct mwifiex_adapter *adapter, int mask,
	vaf.fmt = fmt;
	vaf.va = &args;

	if (adapter->dev)
		dev_info(adapter->dev, "%pV", &vaf);
	else
		pr_info("%pV", &vaf);

	va_end(args);
}