From 70fee9207b5fd1c6f499b790591446adc4d4467c Mon Sep 17 00:00:00 2001 From: Øyvind Harboe Date: Mon, 19 Jul 2010 08:45:45 +0200 Subject: arm: add error propagation to generic get_ttb fn MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Øyvind Harboe --- src/target/armv4_5_mmu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/target/armv4_5_mmu.c') diff --git a/src/target/armv4_5_mmu.c b/src/target/armv4_5_mmu.c index 861410dd..3d450ae1 100644 --- a/src/target/armv4_5_mmu.c +++ b/src/target/armv4_5_mmu.c @@ -30,8 +30,11 @@ int armv4_5_mmu_translate_va(struct target *target, struct armv4_5_mmu_common *a { uint32_t first_lvl_descriptor = 0x0; uint32_t second_lvl_descriptor = 0x0; - uint32_t ttb = armv4_5_mmu->get_ttb(target); + uint32_t ttb; int retval; + retval = armv4_5_mmu->get_ttb(target, &ttb); + if (retval != ERROR_OK) + return retval; retval = armv4_5_mmu_read_physical(target, armv4_5_mmu, (ttb & 0xffffc000) | ((va & 0xfff00000) >> 18), -- cgit v1.2.3