forked from MIrrors/gasket-driver
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 <toddpoynor@google.com>
This commit is contained in:
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user