diff options
author | Todd Poynor <toddpoynor@google.com> | 2018-10-15 07:59:18 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-10-15 17:30:37 +0300 |
commit | b1004491c9c2a62a8ca4d939e35b3c21abc8f28a (patch) | |
tree | 4abc1f4376cd75581959e1e05e761b0c08e12890 /drivers/staging/gasket | |
parent | 7fa3069dfcf82d9c84197f7dae2759cc9bf80667 (diff) | |
download | linux-b1004491c9c2a62a8ca4d939e35b3c21abc8f28a.tar.xz |
staging: gasket: page table: return valid error code on map fail
Return -EINVAL on mapping failures, instead of -1, which triggers a
checkpatch error.
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 | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/staging/gasket/gasket_page_table.c b/drivers/staging/gasket/gasket_page_table.c index 964146f0df52..2e1de8ad4a2c 100644 --- a/drivers/staging/gasket/gasket_page_table.c +++ b/drivers/staging/gasket/gasket_page_table.c @@ -514,13 +514,12 @@ static int gasket_perform_mapping(struct gasket_page_table *pg_tbl, (void *)page_to_pfn(page), (void *)page_to_phys(page)); - /* clean up */ if (gasket_release_page(ptes[i].page)) --pg_tbl->num_active_pages; memset(&ptes[i], 0, sizeof(struct gasket_page_table_entry)); - return -1; + return -EINVAL; } } @@ -1165,7 +1164,7 @@ fail: *ppage = NULL; *poffset = 0; mutex_unlock(&pg_tbl->mutex); - return -1; + return -EINVAL; } /* See gasket_page_table.h for description. */ |