]> git.baikalelectronics.ru Git - kernel.git/commit
swiotlb: use the right nslabs value in swiotlb_init_remap
authorChristoph Hellwig <hch@lst.de>
Wed, 11 May 2022 06:13:57 +0000 (08:13 +0200)
committerChristoph Hellwig <hch@lst.de>
Fri, 13 May 2022 10:49:18 +0000 (12:49 +0200)
commit18de604587c6862b39e694ecea1bd5b775d716a1
tree0e002f243288f4fe04618ab50062f20e3b07ed72
parent049951ed7f7f79a8090a18408c83a48e18191e3a
swiotlb: use the right nslabs value in swiotlb_init_remap

default_nslabs should only be used to initialize nslabs, after that we
need to use the local variable that can shrink when allocations or the
remap don't succeed.

Fixes: b4156af37861 ("swiotlb: remove swiotlb_init_with_tbl and swiotlb_init_late_with_tbl")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
kernel/dma/swiotlb.c