Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 82598b4f authored by Johannes Berg's avatar Johannes Berg
Browse files

iwlwifi: mvm: fix NVM parsing error path



If NVM parsing fails and returns NULL, we continue in
the code flow and eventually crash accessing the NULL
pointer. Return an error from iwl_nvm_init() if the
parsing failed.

Reviewed-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent bf0fd5da
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -231,8 +231,9 @@ int iwl_nvm_init(struct iwl_mvm *mvm)
	if (ret < 0)
		return ret;

	ret = 0;
	mvm->nvm_data = iwl_parse_nvm_sections(mvm);
	if (!mvm->nvm_data)
		return -ENODATA;

	return ret;
	return 0;
}