0058-net-mediatek-unlock-on-error-in-mtk_tx_map.patch 783 B

123456789101112131415161718192021222324
  1. From 6c12340c0c307d18b8d6120f64a8275b6d4d3e67 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 058/102] net: mediatek: unlock on error in mtk_tx_map()
  5. There was a missing unlock on the error path.
  6. Fixes: 656e705243fd ('net-next: mediatek: add support for MT7623 ethernet')
  7. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
  8. ---
  9. drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 ++
  10. 1 file changed, 2 insertions(+)
  11. --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
  12. +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
  13. @@ -661,6 +661,8 @@ err_dma:
  14. itxd = mtk_qdma_phys_to_virt(ring, itxd->txd2);
  15. } while (itxd != txd);
  16. + spin_unlock_irqrestore(&eth->page_lock, flags);
  17. +
  18. return -ENOMEM;
  19. }