diff options
author | James Morris <james.morris@microsoft.com> | 2018-03-22 17:26:16 -0400 |
---|---|---|
committer | James Morris <james.morris@microsoft.com> | 2018-03-22 17:26:16 -0400 |
commit | 5893ed18a26d1f56b97c0290b0cbbc2d49d6de28 (patch) | |
tree | 97aa931519fca28a0a12fad7485347198f8267cc /lib/dma-debug.c | |
parent | 7bd698b3c04e61ee9e03d4c2a55003f75df14dca (diff) | |
parent | c698ca5278934c0ae32297a8725ced2e27585d7f (diff) |
Merge tag 'v4.16-rc6' into next-general
Merge to Linux 4.16-rc6 at the request of Jarkko, for his TPM updates.
Diffstat (limited to 'lib/dma-debug.c')
-rw-r--r-- | lib/dma-debug.c | 10 |
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)) |