summaryrefslogtreecommitdiffstats
path: root/common/memtest.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/memtest.c')
-rw-r--r--common/memtest.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/memtest.c b/common/memtest.c
index 5c96d46e9a..44ddedd3d4 100644
--- a/common/memtest.c
+++ b/common/memtest.c
@@ -131,8 +131,8 @@ void mem_test_release_regions(struct list_head *list)
/*
* Ensure to leave with a cached on non used sdram regions.
*/
- remap_range((void *)r->r->start, r->r->end -
- r->r->start + 1, MAP_DEFAULT);
+ remap_range((void *)r->r->start, resource_size(r->r),
+ MAP_DEFAULT);
release_sdram_region(r->r);
free(r);