iwlwifi: avoid crash on unsupported debug collection
authorJohannes Berg <johannes.berg@intel.com>
Fri, 19 Feb 2021 12:35:07 +0000 (13:35 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 22 Feb 2021 07:22:16 +0000 (09:22 +0200)
commit4538c5ed0f7e892f1b643472e48146757d1e60c5
tree8f1735f1fb660d895524df06f9ed96bce5c7854a
parent94f0e6256c2ab6803c935634aa1f653174c94879
iwlwifi: avoid crash on unsupported debug collection

If the opmode doesn't support debug collection (DVM) then don't
crash, but just skip the callback.

Fixes: d01293154c0a ("iwlwifi: dbg: add op_mode callback for collecting debug data.")
Reported-by: Andy Lavr <andy.lavr@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210219133506.ecabe285bc7d.I73d230d555c595fa2d9bf284f80078729fe18aa4@changeid
drivers/net/wireless/intel/iwlwifi/iwl-op-mode.h