Skip to content

Commit

Permalink
net: mediatek: invalid buffer lookup in mtk_tx_map()
Browse files Browse the repository at this point in the history
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@phrozen.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
John Crispin authored and David S. Miller committed Jun 11, 2016
1 parent 605e4fe commit 2fae723
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/mediatek/mtk_eth_soc.c
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,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);
Expand Down

0 comments on commit 2fae723

Please sign in to comment.