Skip to content

Commit c5c177c

Browse files
committed
Merge tag 'dma-mapping-4.17-2' of git://git.infradead.org/users/hch/dma-mapping
Pull dma-mapping fix from Christoph Hellwig: "Fix for one swiotlb regression in 2.16 from Takashi" * tag 'dma-mapping-4.17-2' of git://git.infradead.org/users/hch/dma-mapping: swiotlb: fix unexpected swiotlb_alloc_coherent failures
2 parents d1cb771 + 9e7f06c commit c5c177c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/swiotlb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ swiotlb_alloc_buffer(struct device *dev, size_t size, dma_addr_t *dma_handle,
719719
goto out_warn;
720720

721721
*dma_handle = __phys_to_dma(dev, phys_addr);
722-
if (dma_coherent_ok(dev, *dma_handle, size))
722+
if (!dma_coherent_ok(dev, *dma_handle, size))
723723
goto out_unmap;
724724

725725
memset(phys_to_virt(phys_addr), 0, size);

0 commit comments

Comments
 (0)