swiotlb: bail out of swiotlb_init_late() if swiotlb is already allocated
authorPetr Tesarik <petr.tesarik.ext@huawei.com>
Tue, 1 Aug 2023 06:23:56 +0000 (08:23 +0200)
committerChristoph Hellwig <hch@lst.de>
Tue, 1 Aug 2023 16:02:02 +0000 (18:02 +0200)
commit0c6874a6ac0474b54c8d1ba33e243ec578ff815a
treed3de8f2e381871d8b58bf7b56ac0bdb24b23cff3
parent3fa6456ebe13adab3ba1817c8e515a5b88f95dce
swiotlb: bail out of swiotlb_init_late() if swiotlb is already allocated

If swiotlb is allocated, immediately return 0, so callers do not have to
check io_tlb_default_mem.nslabs explicitly.

Signed-off-by: Petr Tesarik <petr.tesarik.ext@huawei.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
arch/arm/xen/mm.c
kernel/dma/swiotlb.c