r8152: check budget for r8152_poll()
authorHayes Wang <hayeswang@realtek.com>
Fri, 8 Sep 2023 07:01:52 +0000 (15:01 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 11 Sep 2023 08:58:34 +0000 (09:58 +0100)
commita7b8d60b37237680009dd0b025fe8c067aba0ee3
tree794184e196f3b1272d7f1a56d2486dbc5acb3be4
parent904de9858eb4b48a217bb6e26f43c37d4c52ff36
r8152: check budget for r8152_poll()

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>
drivers/net/usb/r8152.c