From: Ilan Peer Date: Sun, 16 Jun 2013 09:18:11 +0000 (+0300) Subject: iwlwifi: mvm: Return on inconsistency in add interface X-Git-Tag: upstream/snapshot3+hdmi~4422^2~84^2^2~55^2~42 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fd11bd05552e8639abbdc2f1d478f70dfb9b5e3e;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git iwlwifi: mvm: Return on inconsistency in add interface 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 Reviewed-by: Emmanuel Grumbach Signed-off-by: Johannes Berg --- diff --git a/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c index 94aae9c..5fe23a5 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c +++ b/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c @@ -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);