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 <oren.givon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
This commit is contained in:
Oren Givon 2015-11-25 11:17:41 +02:00 committed by Emmanuel Grumbach
parent f370f5cffe
commit 488c28e110

View File

@ -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)