sparc64: restore irq in error paths in iommu
There are some error paths where we should restore IRQs but we don't.
Fixes: bb620c3d39
("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>
This commit is contained in:
parent
601e6e3cc5
commit
e241cfd3bd
@ -242,6 +242,7 @@ static void *dma_4v_alloc_coherent(struct device *dev, size_t size,
|
|||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
iommu_map_fail:
|
iommu_map_fail:
|
||||||
|
local_irq_restore(flags);
|
||||||
iommu_tbl_range_free(tbl, *dma_addrp, npages, IOMMU_ERROR_CODE);
|
iommu_tbl_range_free(tbl, *dma_addrp, npages, IOMMU_ERROR_CODE);
|
||||||
|
|
||||||
range_alloc_fail:
|
range_alloc_fail:
|
||||||
@ -414,6 +415,7 @@ bad:
|
|||||||
return DMA_ERROR_CODE;
|
return DMA_ERROR_CODE;
|
||||||
|
|
||||||
iommu_map_fail:
|
iommu_map_fail:
|
||||||
|
local_irq_restore(flags);
|
||||||
iommu_tbl_range_free(tbl, bus_addr, npages, IOMMU_ERROR_CODE);
|
iommu_tbl_range_free(tbl, bus_addr, npages, IOMMU_ERROR_CODE);
|
||||||
return DMA_ERROR_CODE;
|
return DMA_ERROR_CODE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user