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

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