diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2016-11-26 00:15:37 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-12-11 18:15:49 -0800 |
commit | e241cfd3bd3503ef6a909f41f0adf06be193fe25 (patch) | |
tree | 465355f3dd74d89bfcb1d85a325baa2e364ba4e6 | |
parent | 601e6e3cc5bf6adb7d076fe24d10f6191a25ba9b (diff) |
sparc64: restore irq in error paths in iommu
There are some error paths where we should restore IRQs but we don't.
Fixes: bb620c3d3925 ("sparc: Make sparc64 use scalable lib/iommu-common.c functions")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | arch/sparc/kernel/pci_sun4v.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/sparc/kernel/pci_sun4v.c b/arch/sparc/kernel/pci_sun4v.c index cabb609fedcc..f4daccd12bf5 100644 --- a/arch/sparc/kernel/pci_sun4v.c +++ b/arch/sparc/kernel/pci_sun4v.c @@ -242,6 +242,7 @@ static void *dma_4v_alloc_coherent(struct device *dev, size_t size, return ret; iommu_map_fail: + local_irq_restore(flags); iommu_tbl_range_free(tbl, *dma_addrp, npages, IOMMU_ERROR_CODE); range_alloc_fail: @@ -414,6 +415,7 @@ bad: return DMA_ERROR_CODE; iommu_map_fail: + local_irq_restore(flags); iommu_tbl_range_free(tbl, bus_addr, npages, IOMMU_ERROR_CODE); return DMA_ERROR_CODE; } |