diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2018-03-08 22:07:30 +0300 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2018-03-08 22:07:30 +0300 |
commit | c6380ecd8e9bee7aba3d9a5a94b58168244c4a61 (patch) | |
tree | f8d9522c66e805f638399e094f8e0dfd92584d06 /lib/dma-debug.c | |
parent | cdc2466df40f26af60f6b18123069bd52336a80c (diff) | |
parent | 661e50bc853209e41a5c14a290ca4decc43cbfd1 (diff) | |
download | linux-c6380ecd8e9bee7aba3d9a5a94b58168244c4a61.tar.xz |
Merge tag 'v4.16-rc4' into next
Sync up with mainline to bring in RAVE MFD device core.
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, if (unlikely(virt == NULL)) return; - entry = dma_entry_alloc(); - if (!entry) + /* handle vmalloc and linear addresses */ + if (!is_vmalloc_addr(virt) && !virt_addr_valid(virt)) return; - /* handle vmalloc and linear addresses */ - if (!is_vmalloc_addr(virt) && !virt_to_page(virt)) + entry = dma_entry_alloc(); + if (!entry) return; entry->type = dma_debug_coherent; @@ -1528,7 +1528,7 @@ void debug_dma_free_coherent(struct device *dev, size_t size, }; /* handle vmalloc and linear addresses */ - if (!is_vmalloc_addr(virt) && !virt_to_page(virt)) + if (!is_vmalloc_addr(virt) && !virt_addr_valid(virt)) return; if (is_vmalloc_addr(virt)) |