From 488b7567098aee76b3d55e4bc6d4e642fb2e526d Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Thu, 27 Sep 2018 02:20:11 +0200 Subject: chacha20: break out of zero loops in selftest Signed-off-by: Jason A. Donenfeld --- src/crypto/zinc/selftest/chacha20.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/crypto/zinc/selftest/chacha20.h') diff --git a/src/crypto/zinc/selftest/chacha20.h b/src/crypto/zinc/selftest/chacha20.h index 16add65..6c270c8 100644 --- a/src/crypto/zinc/selftest/chacha20.h +++ b/src/crypto/zinc/selftest/chacha20.h @@ -2553,6 +2553,7 @@ static bool __init chacha20_selftest(void) pr_err("chacha20 self-test %zu (zero check): FAIL\n", i + 1); success = false; + break; } } @@ -2583,6 +2584,7 @@ static bool __init chacha20_selftest(void) pr_err("chacha20 self-test %zu (unaligned, zero check): FAIL\n", i + 1); success = false; + break; } } @@ -2611,6 +2613,7 @@ static bool __init chacha20_selftest(void) pr_err("chacha20 self-test %zu (chunked, zero check): FAIL\n", i + 1); success = false; + break; } } @@ -2640,6 +2643,7 @@ next_test: pr_err("chacha20 self-test %zu (unaligned, slide %zu, zero check): FAIL\n", i + 1, j); success = false; + break; } } for (k = chacha20_testvecs[i].ilen + j; @@ -2648,6 +2652,7 @@ next_test: pr_err("chacha20 self-test %zu (unaligned, slide %zu, zero check): FAIL\n", i + 1, j); success = false; + break; } } } -- cgit v1.2.3