|
@@ -719,7 +719,7 @@ swiotlb_alloc_buffer(struct device *dev, size_t size, dma_addr_t *dma_handle,
|
|
|
goto out_warn;
|
|
|
|
|
|
*dma_handle = __phys_to_dma(dev, phys_addr);
|
|
|
- if (dma_coherent_ok(dev, *dma_handle, size))
|
|
|
+ if (!dma_coherent_ok(dev, *dma_handle, size))
|
|
|
goto out_unmap;
|
|
|
|
|
|
memset(phys_to_virt(phys_addr), 0, size);
|