diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-04-12 14:00:48 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-04-12 14:00:48 -0400 |
commit | c5c177c5fd952720d6b659f596d6eb9be59c9000 (patch) | |
tree | a26d9064a7fbba1780467a8d97e882de263c0636 | |
parent | d1cb7718cfe3a464189cb3d1ee2c092565bc8b39 (diff) | |
parent | 9e7f06c8beee304ee21b791653fefcd713f48b9a (diff) |
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
-rw-r--r-- | lib/swiotlb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/swiotlb.c b/lib/swiotlb.c index 47aeb04c1997..de7cc540450f 100644 --- a/lib/swiotlb.c +++ b/lib/swiotlb.c | |||
@@ -719,7 +719,7 @@ swiotlb_alloc_buffer(struct device *dev, size_t size, dma_addr_t *dma_handle, | |||
719 | goto out_warn; | 719 | goto out_warn; |
720 | 720 | ||
721 | *dma_handle = __phys_to_dma(dev, phys_addr); | 721 | *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)) |
723 | goto out_unmap; | 723 | goto out_unmap; |
724 | 724 | ||
725 | memset(phys_to_virt(phys_addr), 0, size); | 725 | memset(phys_to_virt(phys_addr), 0, size); |