diff options
author | Antonio Borneo <borneo.antonio@gmail.com> | 2010-06-12 11:46:56 +0800 |
---|---|---|
committer | Øyvind Harboe <oyvind.harboe@zylin.com> | 2010-06-12 12:08:06 +0200 |
commit | ce58ab9a4ef7f014eac4d2e30d2b54b2c3e53895 (patch) | |
tree | c77cbe47dd7e482ec8b7d35a2c0c0300109d2e28 /src/target/armv4_5_mmu.c | |
parent | dcc7de4f9b4dfa58ed8a8712c4c146a3c83aba17 (diff) | |
download | riscv-openocd-ce58ab9a4ef7f014eac4d2e30d2b54b2c3e53895.zip riscv-openocd-ce58ab9a4ef7f014eac4d2e30d2b54b2c3e53895.tar.gz riscv-openocd-ce58ab9a4ef7f014eac4d2e30d2b54b2c3e53895.tar.bz2 |
TARGET: fix handling return code of MMU translation
Function armv4_5_mmu_translate_va() now properly signals
errors in the return value.
Remove former error handling by setting variable "type" to
value "-1".
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Diffstat (limited to 'src/target/armv4_5_mmu.c')
-rw-r--r-- | src/target/armv4_5_mmu.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/target/armv4_5_mmu.c b/src/target/armv4_5_mmu.c index 6990d13..52756c1 100644 --- a/src/target/armv4_5_mmu.c +++ b/src/target/armv4_5_mmu.c @@ -44,14 +44,12 @@ int armv4_5_mmu_translate_va(struct target *target, struct armv4_5_mmu_common *a if ((first_lvl_descriptor & 0x3) == 0) { - *type = -1; LOG_ERROR("Address translation failure"); return ERROR_TARGET_TRANSLATION_FAULT; } if (!armv4_5_mmu->has_tiny_pages && ((first_lvl_descriptor & 0x3) == 3)) { - *type = -1; LOG_ERROR("Address translation failure"); return ERROR_TARGET_TRANSLATION_FAULT; } @@ -94,7 +92,6 @@ int armv4_5_mmu_translate_va(struct target *target, struct armv4_5_mmu_common *a if ((second_lvl_descriptor & 0x3) == 0) { - *type = -1; LOG_ERROR("Address translation failure"); return ERROR_TARGET_TRANSLATION_FAULT; } @@ -130,7 +127,6 @@ int armv4_5_mmu_translate_va(struct target *target, struct armv4_5_mmu_common *a } /* should not happen */ - *type = -1; LOG_ERROR("Address translation failure"); return ERROR_TARGET_TRANSLATION_FAULT; } |