iwlwifi: mvm: Return on inconsistency in add interface
authorIlan Peer <ilan.peer@intel.com>
Sun, 16 Jun 2013 09:18:11 +0000 (12:18 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 31 Jul 2013 09:05:00 +0000 (11:05 +0200)
Return in case that HW restart is in progress but the added
interface is not found during the iteration over all the interfaces.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c

index 94aae9c8562c41fadd4069c20d7ae3cbe8eb2683..5fe23a5ea9b66b662cd746c113b644b1318517e2 100644 (file)
@@ -264,7 +264,8 @@ static int iwl_mvm_mac_ctxt_allocate_resources(struct iwl_mvm *mvm,
                return 0;
 
        /* Therefore, in recovery, we can't get here */
-       WARN_ON_ONCE(test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status));
+       if (WARN_ON_ONCE(test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status)))
+               return -EBUSY;
 
        mvmvif->id = find_first_bit(data.available_mac_ids,
                                    NUM_MAC_INDEX_DRIVER);