From 2cf73b87466a3c423af0abeeb0beba8ae4c2ec07 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fran=C3=A7ois=20Romieu?= Date: Tue, 22 Feb 2005 10:44:13 -0500 Subject: [PATCH] [PATCH] r8169: fix rx skb allocation error logging Fix rx skb allocation error logging Signed arithmetic is not required as rtl8169_rx_fill() return belongs to the [0; NUM_RX_DESC] interval. Signed-off-by: Jon Mason Signed-off-by: Francois Romieu Signed-off-by: Jeff Garzik --- drivers/net/r8169.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 3f7171fbaebc..289059d9bb5b 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -2156,8 +2156,8 @@ static int rtl8169_rx_interrupt(struct net_device *dev, struct rtl8169_private *tp, void __iomem *ioaddr) { - unsigned int cur_rx, rx_left, count; - int delta; + unsigned int cur_rx, rx_left; + unsigned int delta, count; assert(dev != NULL); assert(tp != NULL); @@ -2225,10 +2225,8 @@ rtl8169_rx_interrupt(struct net_device *dev, struct rtl8169_private *tp, tp->cur_rx = cur_rx; delta = rtl8169_rx_fill(tp, dev, tp->dirty_rx, tp->cur_rx); - if (delta < 0) { + if (!delta && count) printk(KERN_INFO "%s: no Rx buffer allocated\n", dev->name); - delta = 0; - } tp->dirty_rx += delta; /* -- 2.39.5