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

Commit 37e847b6 authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman
Browse files

iwlwifi: mvm: Fix an error code in iwl_mvm_up()



[ Upstream commit 583d18336abdfb1b355270289ff8f6a2608ba905 ]

Return -ENODEV instead of success on this error path.

Fixes: dd36a507 ("iwlwifi: mvm: look for the first supported channel when add/remove phy ctxt")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20210816183930.GA2068@kili


Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 4ad7d29e
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1417,8 +1417,10 @@ int iwl_mvm_up(struct iwl_mvm *mvm)
	while (!sband && i < NUM_NL80211_BANDS)
		sband = mvm->hw->wiphy->bands[i++];

	if (WARN_ON_ONCE(!sband))
	if (WARN_ON_ONCE(!sband)) {
		ret = -ENODEV;
		goto error;
	}

	chan = &sband->channels[0];