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/arm926ejs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/target/arm926ejs.c') diff --git a/src/target/arm926ejs.c b/src/target/arm926ejs.c index d68e5ca3..0cf71735 100644 --- a/src/target/arm926ejs.c +++ b/src/target/arm926ejs.c @@ -323,7 +323,7 @@ static int arm926ejs_examine_debug_reason(struct target *target) return ERROR_OK; } -static uint32_t arm926ejs_get_ttb(struct target *target) +static int arm926ejs_get_ttb(struct target *target, uint32_t *result) { struct arm926ejs_common *arm926ejs = target_to_arm926(target); int retval; @@ -332,7 +332,9 @@ static uint32_t arm926ejs_get_ttb(struct target *target) if ((retval = arm926ejs->read_cp15(target, 0, 0, 2, 0, &ttb)) != ERROR_OK) return retval; - return ttb; + *result = ttb; + + return ERROR_OK; } static void arm926ejs_disable_mmu_caches(struct target *target, int mmu, -- cgit v1.2.3