diff options
author | Todd Poynor <toddpoynor@google.com> | 2018-08-09 20:21:03 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-08-27 19:43:43 +0200 |
commit | 6c258edc64ae3d655a37abb773c21492a5196bf2 (patch) | |
tree | 26b90075840cb48f80e34237fcb7b4ab2d83ae39 /drivers/staging/gasket | |
parent | 1fdd6d720cdc31b569189f6c534250b9deb1152d (diff) |
staging: gasket: page table: use dma_mapping_error for error detection
gasket_perform_mapping() call dma_mapping_error() to determine if
mapping failed.
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/gasket')
-rw-r--r-- | drivers/staging/gasket/gasket_page_table.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/gasket/gasket_page_table.c b/drivers/staging/gasket/gasket_page_table.c index bd921dc6094d..4d2499269499 100644 --- a/drivers/staging/gasket/gasket_page_table.c +++ b/drivers/staging/gasket/gasket_page_table.c @@ -493,7 +493,8 @@ static int gasket_perform_mapping(struct gasket_page_table *pg_tbl, (void *)page_to_pfn(page), (unsigned long long)ptes[i].dma_addr); - if (ptes[i].dma_addr == -1) { + if (dma_mapping_error(pg_tbl->device, + ptes[i].dma_addr)) { dev_dbg(pg_tbl->device, "%s i %d -> fail to map page %llx " "[pfn %p ohys %p]\n", |