提交 056fd2c5 编写于 作者: D Dan Carpenter 提交者: Zheng Zengkai

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

stable inclusion
from stable-v5.10.110
commit 441a83ff270effab2ccdcee9ed441c8c1c250a28
bugzilla: https://gitee.com/openeuler/kernel/issues/I574AL

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=441a83ff270effab2ccdcee9ed441c8c1c250a28

--------------------------------

[ Upstream commit 583d1833 ]

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>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYu Liao <liaoyu15@huawei.com>
Reviewed-by: NWei Li <liwei391@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 671d53e4
无相关合并请求
......@@ -1495,8 +1495,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.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部