From 71591a83add8dd8de04f51abdd68770ff51f57ee Mon Sep 17 00:00:00 2001 From: Leonid Lobachev Date: Mon, 23 Sep 2019 11:49:33 -0700 Subject: [PATCH] staging: gasket: page table: return valid error code on map fail Return -EINVAL on mapping failures, instead of -1, which triggers a checkpatch error. Change-Id: I91a62a72caa5ca09e07bd4897e72f4919495c040 Signed-off-by: Todd Poynor --- gasket_page_table.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gasket_page_table.c b/gasket_page_table.c index 42d479a..51497d0 100644 --- a/gasket_page_table.c +++ b/gasket_page_table.c @@ -500,7 +500,7 @@ static int gasket_perform_mapping(struct gasket_page_table *pg_tbl, (unsigned long long)ptes[i].dma_addr, (void *)page_to_pfn(page), (void *)page_to_phys(page)); - return -1; + return -EINVAL; } } @@ -1147,7 +1147,7 @@ fail: *ppage = NULL; *poffset = 0; mutex_unlock(&pg_tbl->mutex); - return -1; + return -EINVAL; } /* See gasket_page_table.h for description. */