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: f53c3fe8da ('xen-netback: Introduce TX grant mapping')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Dan Carpenter 2015-07-12 01:20:55 +03:00 committed by David S. Miller
parent f760b87f8f
commit 50c2e4dd67

View file

@ -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++)];