]> git.sur5r.net Git - openocd/commitdiff
armv7a: forward error value in armv7a_cache_auto_flush_all_data
authorOleksij Rempel <linux@rempel-privat.de>
Tue, 30 Jan 2018 09:37:51 +0000 (10:37 +0100)
committerMatthias Welwarsky <matthias@welwarsky.de>
Wed, 21 Feb 2018 08:19:19 +0000 (08:19 +0000)
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 <linux@rempel-privat.de>
Reviewed-on: http://openocd.zylin.com/4384
Tested-by: jenkins
Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
src/target/armv7a_cache.c

index 7af3e6d4e8a2d6ff1cf8ba9917613fcea9fe1f0b..3e5f8d6def98a371d39b282d123d9da4befffe65 100644 (file)
@@ -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);
 }