575d760cbe40eb81d18ed3e354a928b86011a3e6
[openwrt/staging/chunkeey.git] / target / linux / mediatek / patches-4.4 / 0061-net-mediatek-unlock-on-error-in-mtk_tx_map.patch
1 From d8261ad9e408adfa5d1758a0f655c7726f0f831b Mon Sep 17 00:00:00 2001
2 From: Dan Carpenter <dan.carpenter@oracle.com>
3 Date: Tue, 15 Mar 2016 10:19:04 +0300
4 Subject: [PATCH 61/81] net: mediatek: unlock on error in mtk_tx_map()
5
6 There was a missing unlock on the error path.
7
8 Fixes: 656e705243fd ('net-next: mediatek: add support for MT7623 ethernet')
9 Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
10 ---
11 drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 ++
12 1 file changed, 2 insertions(+)
13
14 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
15 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
16 @@ -661,6 +661,8 @@ err_dma:
17 itxd = mtk_qdma_phys_to_virt(ring, itxd->txd2);
18 } while (itxd != txd);
19
20 + spin_unlock_irqrestore(&eth->page_lock, flags);
21 +
22 return -ENOMEM;
23 }
24