提交 583d1833 编写于 作者: D Dan Carpenter 提交者: Luca Coelho

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

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: NDan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20210816183930.GA2068@kiliSigned-off-by: NLuca Coelho <luciano.coelho@intel.com>
上级 c305c94b
......@@ -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];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册