Unverified Commit 246b4569 authored by davidcunado-arm's avatar davidcunado-arm Committed by GitHub
Browse files

Merge pull request #1218 from antonio-nino-diaz-arm/an/xlat-fix

xlat v2: Correctly unmap regions on map error
parents 0cd67c39 96abc22b
/* /*
* Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
...@@ -893,7 +893,7 @@ int mmap_add_dynamic_region_ctx(xlat_ctx_t *ctx, mmap_region_t *mm) ...@@ -893,7 +893,7 @@ int mmap_add_dynamic_region_ctx(xlat_ctx_t *ctx, mmap_region_t *mm)
* Check if the mapping function actually managed to map * Check if the mapping function actually managed to map
* anything. If not, just return now. * anything. If not, just return now.
*/ */
if (mm_cursor->base_va >= end_va) if (mm->base_va >= end_va)
return -ENOMEM; return -ENOMEM;
/* /*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment