aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dma-debug.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-03-20 06:27:18 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-03-20 06:27:18 -0400
commit4958134df54c2c84e9c22ea042761d439164d26e (patch)
tree503177afab11f7d25b12a84ce25b481d305c51ba /lib/dma-debug.c
parentc4f528795d1add8b63652673f7262729f679c6c1 (diff)
parentc698ca5278934c0ae32297a8725ced2e27585d7f (diff)
Merge 4.16-rc6 into tty-next
We want the serial/tty fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/dma-debug.c')
-rw-r--r--lib/dma-debug.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/dma-debug.c b/lib/dma-debug.c
index 1b34d210452c..7f5cdc1e6b29 100644
--- a/lib/dma-debug.c
+++ b/lib/dma-debug.c
@@ -1491,12 +1491,12 @@ void debug_dma_alloc_coherent(struct device *dev, size_t size,
1491 if (unlikely(virt == NULL)) 1491 if (unlikely(virt == NULL))
1492 return; 1492 return;
1493 1493
1494 entry = dma_entry_alloc(); 1494 /* handle vmalloc and linear addresses */
1495 if (!entry) 1495 if (!is_vmalloc_addr(virt) && !virt_addr_valid(virt))
1496 return; 1496 return;
1497 1497
1498 /* handle vmalloc and linear addresses */ 1498 entry = dma_entry_alloc();
1499 if (!is_vmalloc_addr(virt) && !virt_to_page(virt)) 1499 if (!entry)
1500 return; 1500 return;
1501 1501
1502 entry->type = dma_debug_coherent; 1502 entry->type = dma_debug_coherent;
@@ -1528,7 +1528,7 @@ void debug_dma_free_coherent(struct device *dev, size_t size,
1528 }; 1528 };
1529 1529
1530 /* handle vmalloc and linear addresses */ 1530 /* handle vmalloc and linear addresses */
1531 if (!is_vmalloc_addr(virt) && !virt_to_page(virt)) 1531 if (!is_vmalloc_addr(virt) && !virt_addr_valid(virt))
1532 return; 1532 return;
1533 1533
1534 if (is_vmalloc_addr(virt)) 1534 if (is_vmalloc_addr(virt))