Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 50c2e4dd authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller
Browse files

net/xen-netback: off by one in BUG_ON() condition



The > should be >=.  I also added spaces around the '-' operations so
the code is a little more consistent and matches the condition better.

Fixes: f53c3fe8 ('xen-netback: Introduce TX grant mapping')
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f760b87f
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1566,7 +1566,7 @@ static inline void xenvif_tx_dealloc_action(struct xenvif_queue *queue)
		smp_rmb();

		while (dc != dp) {
			BUG_ON(gop - queue->tx_unmap_ops > MAX_PENDING_REQS);
			BUG_ON(gop - queue->tx_unmap_ops >= MAX_PENDING_REQS);
			pending_idx =
				queue->dealloc_ring[pending_index(dc++)];