iwlwifi: pcie: avoid potential PNVM leaks
authorJohannes Berg <johannes.berg@intel.com>
Fri, 15 Jan 2021 11:05:49 +0000 (13:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Feb 2021 22:28:47 +0000 (23:28 +0100)
commitc00b0b65b3b3b41d053418d903e21fce045f6020
treea81b27ac837cd5d8b3d44f345b4b95cf5d8c13ee
parentfd8c453d53f8220c8f1b4bd61a6be7b53d4af847
iwlwifi: pcie: avoid potential PNVM leaks

[ Upstream commit 34b9434cd0d425330a0467e767f8d047ef62964d ]

If we erroneously try to set the PNVM data again after it has
already been set, we could leak the old DMA memory. Avoid that
and warn, we shouldn't be doing this.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Fixes: 6972592850c0 ("iwlwifi: read and parse PNVM file")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/iwlwifi.20210115130252.929c2d680429.I086b9490e6c005f3bcaa881b617e9f61908160f3@changeid
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c