summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/marvell/mwifiex/main.c
diff options
context:
space:
mode:
authorXinming Hu <huxm@marvell.com>2017-04-13 08:48:20 +0200
committerKalle Valo <kvalo@codeaurora.org>2017-04-20 09:18:07 +0200
commitef6c7d3cb731e3aa6a4ce8d501b97df73ea40b4e (patch)
tree9de63679282db1dd7a87985f5f803a95357bafcc /drivers/net/wireless/marvell/mwifiex/main.c
parentmwifiex: remove unnecessary wakeup interrupt number sanity check (diff)
downloadlinux-ef6c7d3cb731e3aa6a4ce8d501b97df73ea40b4e.tar.xz
linux-ef6c7d3cb731e3aa6a4ce8d501b97df73ea40b4e.zip
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: Xinming Hu <huxm@marvell.com> Reviewed-by: Brian Norris <briannorris@chromium.org> Reviewed-by: Dmitry Torokhov <dtor@chromium.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/marvell/mwifiex/main.c')
-rw-r--r--drivers/net/wireless/marvell/mwifiex/main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/main.c b/drivers/net/wireless/marvell/mwifiex/main.c
index 3d59d74c7f99..cd21bbf4412f 100644
--- a/drivers/net/wireless/marvell/mwifiex/main.c
+++ b/drivers/net/wireless/marvell/mwifiex/main.c
@@ -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;
- dev_info(adapter->dev, "%pV", &vaf);
+ if (adapter->dev)
+ dev_info(adapter->dev, "%pV", &vaf);
+ else
+ pr_info("%pV", &vaf);
va_end(args);
}