iwlwifi: mvm: replace BUG_ON by WARN_ON in scan.c
While the scan_cmd should really be allocated in init (and we do fail init in case the allocation failed), it doesn't mean we should lock up the machine if something really bad happened. Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
This commit is contained in:
@@ -348,7 +348,10 @@ int iwl_mvm_scan_request(struct iwl_mvm *mvm,
|
||||
struct iwl_mvm_scan_params params = {};
|
||||
|
||||
lockdep_assert_held(&mvm->mutex);
|
||||
BUG_ON(mvm->scan_cmd == NULL);
|
||||
|
||||
/* we should have failed registration if scan_cmd was NULL */
|
||||
if (WARN_ON(mvm->scan_cmd == NULL))
|
||||
return -ENOMEM;
|
||||
|
||||
IWL_DEBUG_SCAN(mvm, "Handling mac80211 scan request\n");
|
||||
mvm->scan_status = IWL_MVM_SCAN_OS;
|
||||
|
Reference in New Issue
Block a user