浏览代码

iwlwifi: mvm: fix theoretical uninitialized function return value

If we try to write NVM that do not exist, the function will return
uninitialized value. fixed.

Signed-off-by: Eytan Lifshitz <eytan.lifshitz@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Eytan Lifshitz 11 年之前
父节点
当前提交
05159fccf2
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/net/wireless/iwlwifi/mvm/nvm.c

+ 1 - 1
drivers/net/wireless/iwlwifi/mvm/nvm.c

@@ -392,7 +392,7 @@ out:
 /* Loads the NVM data stored in mvm->nvm_sections into the NIC */
 int iwl_mvm_load_nvm_to_nic(struct iwl_mvm *mvm)
 {
-	int i, ret;
+	int i, ret = 0;
 	struct iwl_nvm_section *sections = mvm->nvm_sections;
 
 	IWL_DEBUG_EEPROM(mvm->trans->dev, "'Write to NVM\n");