diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2021-08-16 21:39:30 +0300 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2022-02-18 10:40:56 +0200 |
commit | 583d18336abdfb1b355270289ff8f6a2608ba905 (patch) | |
tree | 908e68ef651a2d5532c303d9b10c8f342e3ccedf /drivers/net/wireless/intel | |
parent | c305c94bdc18e45b5ad1db54da4269f8cbfdff6b (diff) | |
download | linux-583d18336abdfb1b355270289ff8f6a2608ba905.tar.bz2 |
iwlwifi: mvm: Fix an error code in iwl_mvm_up()
Return -ENODEV instead of success on this error path.
Fixes: dd36a507c806 ("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>
Diffstat (limited to 'drivers/net/wireless/intel')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c index 9aa15f0cf79c..8537e1ea27d6 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c @@ -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]; |