From: Oleksij Rempel Date: Tue, 30 Jan 2018 09:37:51 +0000 (+0100) Subject: armv7a: forward error value in armv7a_cache_auto_flush_all_data X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e195b0bc812deaad4d770cb1044c5a1b905d8671;p=openocd armv7a: forward error value in armv7a_cache_auto_flush_all_data if armv7a_l1_d_cache_clean_inval_all will fail, error value is never forwarded. So make sure we do it from now. Change-Id: I02acfaa938ec09f58df77191d13d8f4bb3308720 Signed-off-by: Oleksij Rempel Reviewed-on: http://openocd.zylin.com/4384 Tested-by: jenkins Reviewed-by: Matthias Welwarsky --- diff --git a/src/target/armv7a_cache.c b/src/target/armv7a_cache.c index 7af3e6d4..3e5f8d6d 100644 --- a/src/target/armv7a_cache.c +++ b/src/target/armv7a_cache.c @@ -148,10 +148,11 @@ int armv7a_cache_auto_flush_all_data(struct target *target) } else retval = armv7a_l1_d_cache_clean_inval_all(target); - /* do outer cache flushing after inner caches have been flushed */ - retval = arm7a_l2x_flush_all_data(target); + if (retval != ERROR_OK) + return retval; - return retval; + /* do outer cache flushing after inner caches have been flushed */ + return arm7a_l2x_flush_all_data(target); }