mediatek: unlock on error in mtk_tx_map()

There was a missing unlock on the error path.

Fixes: 656e705243 ('net-next: mediatek: add support for MT7623 ethernet')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: John Crispin <blogic@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Dan Carpenter 2016-03-15 10:19:04 +03:00 committed by David S. Miller
parent 977bc20cf6
commit 48e77422a3

View File

@ -661,6 +661,8 @@ static int mtk_tx_map(struct sk_buff *skb, struct net_device *dev,
itxd = mtk_qdma_phys_to_virt(ring, itxd->txd2);
} while (itxd != txd);
spin_unlock_irqrestore(&eth->page_lock, flags);
return -ENOMEM;
}