diff options
author | Øyvind Harboe <oyvind.harboe@zylin.com> | 2010-07-19 08:45:45 +0200 |
---|---|---|
committer | Øyvind Harboe <oyvind.harboe@zylin.com> | 2010-07-19 22:13:48 +0200 |
commit | 70fee9207b5fd1c6f499b790591446adc4d4467c (patch) | |
tree | 441eee8f9af2ed37eaf072d22465246037f99d15 /src/target/armv4_5_mmu.c | |
parent | 612184176fee6333e5372c4637e3cf54628ee416 (diff) |
arm: add error propagation to generic get_ttb fn
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Diffstat (limited to 'src/target/armv4_5_mmu.c')
-rw-r--r-- | src/target/armv4_5_mmu.c | 5 |
1 files changed, 4 insertions, 1 deletions
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), |