From: Oren Givon Date: Wed, 25 Nov 2015 09:17:41 +0000 (+0200) Subject: iwlwifi: nvm: fix loading default NVM file X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=488c28e110e18466c99ffb1e2342498b42d3344e;p=linux-beck.git iwlwifi: nvm: fix loading default NVM file Fix loading the default NVM file, in the case where the requested NVM file isn't found in the file system. Signed-off-by: Oren Givon Signed-off-by: Emmanuel Grumbach --- diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c b/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c index e4fe8a66a3a0..7a3da2da6fd0 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c @@ -642,7 +642,8 @@ int iwl_nvm_init(struct iwl_mvm *mvm, bool read_nvm_from_nic) else mvm->nvm_file_name = nvm_file_C; - if (ret == -EFAULT && mvm->nvm_file_name) { + if ((ret == -EFAULT || ret == -ENOENT) && + mvm->nvm_file_name) { /* in case nvm file was failed try again */ ret = iwl_mvm_read_external_nvm(mvm); if (ret)