[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1465108385-38286-5-git-send-email-john@phrozen.org>
Date: Sun, 5 Jun 2016 08:32:57 +0200
From: John Crispin <john@...ozen.org>
To: "David S. Miller" <davem@...emloft.net>
Cc: Felix Fietkau <nbd@....name>, Sean Wang <keyhaede@...il.com>,
netdev@...r.kernel.org, linux-mediatek@...ts.infradead.org,
linux-kernel@...r.kernel.org, John Crispin <john@...ozen.org>
Subject: [PATCH 04/12] net: mediatek: invalid buffer lookup in mtk_tx_map()
The lookup of the tx_buffer in the error path inside mtk_tx_map() uses the
wrong descriptor pointer. This looks like a copy & paste error. Change the
code to use the correct pointer.
Signed-off-by: John Crispin <john@...ozen.org>
---
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index 8d79bbf..4f22ee9 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -655,7 +655,7 @@ static int mtk_tx_map(struct sk_buff *skb, struct net_device *dev,
err_dma:
do {
- tx_buf = mtk_desc_to_tx_buf(ring, txd);
+ tx_buf = mtk_desc_to_tx_buf(ring, itxd);
/* unmap dma */
mtk_tx_unmap(&dev->dev, tx_buf);
--
1.7.10.4
Powered by blists - more mailing lists