Commit 727fb249 authored by Grant Grundler's avatar Grant Grundler Committed by Zheng Zengkai
Browse files

net: atlantic: reduce scope of is_rsc_complete

stable inclusion
from stable-v5.10.118
commit 9bee8b4275ece3472b2492892708ac6c1efe4fbf
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5L686

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



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

[ Upstream commit 79784d77 ]

Don't defer handling the err case outside the loop. That's pointless.

And since is_rsc_complete is only used inside this loop, declare
it inside the loop to reduce it's scope.

Signed-off-by: default avatarGrant Grundler <grundler@chromium.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
Acked-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
parent 17c852b9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment