Index: kernel/generic/src/mm/as.c
===================================================================
--- kernel/generic/src/mm/as.c	(revision 6aeca0d025e83224a241ae34369bc498a25cfa1d)
+++ kernel/generic/src/mm/as.c	(revision f2c3fed7bb7a48c7891bd6e5776c9271ffea2057)
@@ -574,6 +574,7 @@
  * @param backend_data NULL or a pointer to custom backend data.
  * @param base         Starting virtual address of the area.
- *                     If set to -1, a suitable mappable area is found.
- * @param bound        Lowest address bound if base is set to -1.
+ *                     If set to AS_AREA_ANY, a suitable mappable area is
+ *                     found.
+ * @param bound        Lowest address bound if base is set to AS_AREA_ANY.
  *                     Otherwise ignored.
  *
@@ -585,5 +586,5 @@
     mem_backend_data_t *backend_data, uintptr_t *base, uintptr_t bound)
 {
-	if ((*base != (uintptr_t) -1) && !IS_ALIGNED(*base, PAGE_SIZE))
+	if ((*base != (uintptr_t) AS_AREA_ANY) && !IS_ALIGNED(*base, PAGE_SIZE))
 		return NULL;
 	
@@ -601,5 +602,5 @@
 	mutex_lock(&as->lock);
 	
-	if (*base == (uintptr_t) -1) {
+	if (*base == (uintptr_t) AS_AREA_ANY) {
 		*base = as_get_unmapped_area(as, bound, size, guarded);
 		if (*base == (uintptr_t) -1) {
@@ -2188,5 +2189,5 @@
 	    AS_AREA_ATTR_NONE, &anon_backend, NULL, &virt, bound);
 	if (area == NULL)
-		return (sysarg_t) -1;
+		return (sysarg_t) AS_MAP_FAILED;
 	
 	return (sysarg_t) virt;
