]> git.baikalelectronics.ru Git - kernel.git/commit
swiotlb: fail map correctly with failed io_tlb_default_mem
authorRobin Murphy <robin.murphy@arm.com>
Tue, 12 Jul 2022 06:46:45 +0000 (08:46 +0200)
committerChristoph Hellwig <hch@lst.de>
Tue, 12 Jul 2022 06:47:31 +0000 (08:47 +0200)
commit34ddbbbffdaa2a4f83dc7c7763dad3ed37965e8b
tree7481c5b7cb344f9f23fff070c8a02d9e58b9f2e3
parent8c1b8f13b59f8415c3f2dc7e59267908c69b0475
swiotlb: fail map correctly with failed io_tlb_default_mem

In the failure case of trying to use a buffer which we'd previously
failed to allocate, the "!mem" condition is no longer sufficient since
io_tlb_default_mem became static and assigned by default. Update the
condition to work as intended per the rest of that conversion.

Fixes: abb311e21a2f ("swiotlb: Convert io_default_tlb_mem to static allocation")
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
kernel/dma/swiotlb.c