Subject: [PATCH] r6040: fix wrong assignment in r6040_free_txbufs

From: Florian Fainelli <[email-masked]>
Date: Wed, 24 Sep 2008 21:16:40 +0200

Hello Jeff, Francois,

This is 2.6.27 material but should be applied to your -next branch as well. Thank you.
--
From: Florian Fainelli <[email-masked]>
Subject: [PATCH] r6040: fix wrong assignment in r6040_free_txbufs

This patch fixes a wrong assignment in r6040_free_txbufs
on a receive skb pointer while we should actually do this
on the transmit skb pointer.

Signed-off-by: Florian Fainelli <[email-masked]>
---
diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c
index 396f0e4..5aff7c8 100644
--- a/drivers/net/r6040.c
+++ b/drivers/net/r6040.c
@@ -261,7 +261,7 @@ static void r6040_free_txbufs(struct net_device *dev)
 				le32_to_cpu(lp->tx_insert_ptr->buf),
 				MAX_BUF_SIZE, PCI_DMA_TODEVICE);
 			dev_kfree_skb(lp->tx_insert_ptr->skb_ptr);
-			lp->rx_insert_ptr->skb_ptr = NULL;
+			lp->tx_insert_ptr->skb_ptr = NULL;
 		}
 		lp->tx_insert_ptr = lp->tx_insert_ptr->vndescp;
 	}