소스 검색

iwlwifi: mvm: remove useless check for mvm->cfg in iwl_parse_nvm_section()

At this point we have already copied the cfg pointer to mvm and we
have been dereferencing this pointer many times before, so it will
never be NULL or we would have crashed.  Remove the useless check.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Luca Coelho 8 년 전
부모
커밋
ee4fe54024
1개의 변경된 파일0개의 추가작업 그리고 3개의 파일을 삭제
  1. 0 3
      drivers/net/wireless/intel/iwlwifi/mvm/nvm.c

+ 0 - 3
drivers/net/wireless/intel/iwlwifi/mvm/nvm.c

@@ -326,9 +326,6 @@ iwl_parse_nvm_sections(struct iwl_mvm *mvm)
 		}
 	}
 
-	if (WARN_ON(!mvm->cfg))
-		return NULL;
-
 	hw = (const __le16 *)sections[mvm->cfg->nvm_hw_section_num].data;
 	sw = (const __le16 *)sections[NVM_SECTION_TYPE_SW].data;
 	calib = (const __le16 *)sections[NVM_SECTION_TYPE_CALIBRATION].data;