]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
r8152: check budget for r8152_poll()
authorHayes Wang <hayeswang@realtek.com>
Fri, 8 Sep 2023 07:01:52 +0000 (15:01 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Sep 2023 10:23:03 +0000 (12:23 +0200)
commit864da4a5d5eb6800aadaaef5cb174bd28d7f97ea
treefdfa914d76d5e4287a0f0623d973b44e72e3fc88
parentfbdc4e9908b2462492864b989b604313fdae1178
r8152: check budget for r8152_poll()

[ Upstream commit a7b8d60b37237680009dd0b025fe8c067aba0ee3 ]

According to the document of napi, there is no rx process when the
budget is 0. Therefore, r8152_poll() has to return 0 directly when the
budget is equal to 0.

Fixes: d2187f8e4454 ("r8152: divide the tx and rx bottom functions")
Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/usb/r8152.c