xlat lib: Don't set mmap_attr_t enum to be -1
authorNishanth Menon <nm@ti.com>
Mon, 1 May 2017 17:26:34 +0000 (12:26 -0500)
committerNishanth Menon <nm@ti.com>
Tue, 2 May 2017 12:05:42 +0000 (07:05 -0500)
commit7055e6fa32ef218e23a141ce79748439447abd0b
tree1ac1620f4aa32912758af2eea40691dd45449489
parentdd454b40dfe42dbf77e2f04a3965295380b4f78d
xlat lib: Don't set mmap_attr_t enum to be -1

-1 is not a defined mmap_attr_t type. Instead of using invalid enum
types, we can either choose to define a INVALID type OR handle the
condition specifically.

Since the usage of mmap_region_attr is limited, it is easier to just
handle the error condition specifically and return 0 or -1 depending
on success or fail.

Fixes: ARM-Software/tf-issues#473
Fixes: 28fa2e9ee8f4 ("xlat lib: Use mmap_attr_t type consistently")
Signed-off-by: Nishanth Menon <nm@ti.com>
lib/xlat_tables/xlat_tables_common.c