mediatek: unlock on error in mtk_tx_map()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 15 Mar 2016 07:19:04 +0000 (10:19 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 18 Mar 2016 22:28:11 +0000 (18:28 -0400)
There was a missing unlock on the error path.

Fixes: 656e705243fd ('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>
drivers/net/ethernet/mediatek/mtk_eth_soc.c

index fd19d2d163b8e695bee4c670df6336e9ecdae195..7f2126b6a179fa54888b7de0a469767b71692762 100644 (file)
@@ -661,6 +661,8 @@ err_dma:
                itxd = mtk_qdma_phys_to_virt(ring, itxd->txd2);
        } while (itxd != txd);
 
+       spin_unlock_irqrestore(&eth->page_lock, flags);
+
        return -ENOMEM;
 }