iwlwifi: nvm: fix loading default NVM file
authorOren Givon <oren.givon@intel.com>
Wed, 25 Nov 2015 09:17:41 +0000 (11:17 +0200)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Thu, 7 Jan 2016 17:01:27 +0000 (19:01 +0200)
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>
drivers/net/wireless/intel/iwlwifi/mvm/nvm.c

index e4fe8a66a3a09804c9f54d27b51bfd18c73460cd..7a3da2da6fd0bfe280415849764ca84361ea573a 100644 (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)