From 0538081246fafbfb74d554bb1b758412534aa254 Mon Sep 17 00:00:00 2001 From: Øyvind Harboe Date: Thu, 10 Jun 2010 16:18:14 +0200 Subject: arm mmu: error propagation added for address translation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The return value for MMU translation was a mess, either error or value. Signed-off-by: Øyvind Harboe --- src/target/arm720t.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/target/arm720t.c') diff --git a/src/target/arm720t.c b/src/target/arm720t.c index 00933608..867eb942 100644 --- a/src/target/arm720t.c +++ b/src/target/arm720t.c @@ -260,7 +260,10 @@ static int arm720_virt2phys(struct target *target, uint32_t ap; struct arm720t_common *arm720t = target_to_arm720(target); - uint32_t ret = armv4_5_mmu_translate_va(target, &arm720t->armv4_5_mmu, virtual, &type, &cb, &domain, &ap); + uint32_t ret; + int retval = armv4_5_mmu_translate_va(target, &arm720t->armv4_5_mmu, virtual, &type, &cb, &domain, &ap, &ret); + if (retval != ERROR_OK) + return retval; if (type == -1) { return ret; -- cgit v1.2.3