summaryrefslogtreecommitdiff
path: root/drivers/net/jme.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/jme.c')
-rw-r--r--drivers/net/jme.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/jme.c b/drivers/net/jme.c
index 4da81a3602dc..860dcd98a07c 100644
--- a/drivers/net/jme.c
+++ b/drivers/net/jme.c
@@ -956,13 +956,14 @@ jme_process_receive(struct jme_adapter *jme, int limit)
goto out_inc;
i = atomic_read(&rxring->next_to_clean);
- while (limit-- > 0) {
+ while (limit > 0) {
rxdesc = rxring->desc;
rxdesc += i;
if ((rxdesc->descwb.flags & cpu_to_le16(RXWBFLAG_OWN)) ||
!(rxdesc->descwb.desccnt & RXWBDCNT_WBCPL))
goto out;
+ --limit;
desccnt = rxdesc->descwb.desccnt & RXWBDCNT_DCNT;