Commit 6c258edc authored by Todd Poynor's avatar Todd Poynor Committed by Greg Kroah-Hartman
Browse files

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: default avatarTodd Poynor <toddpoynor@google.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1fdd6d72
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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",