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>
This commit is contained in:
Antonio Borneo
2010-06-12 11:46:56 +08:00
committed by Øyvind Harboe
parent dcc7de4f9b
commit ce58ab9a4e
6 changed files with 0 additions and 26 deletions

View File

@@ -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;
}