Skip to content

Commit

Permalink
iwlwifi: mvm: Fix an error code in iwl_mvm_up()
Browse files Browse the repository at this point in the history
Return -ENODEV instead of success on this error path.

Fixes: dd36a50 ("iwlwifi: mvm: look for the first supported channel when add/remove phy ctxt")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20210816183930.GA2068@kili
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
  • Loading branch information
Dan Carpenter authored and Luca Coelho committed Feb 18, 2022
1 parent c305c94 commit 583d183
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/wireless/intel/iwlwifi/mvm/fw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1709,8 +1709,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];

Expand Down

0 comments on commit 583d183

Please sign in to comment.