summaryrefslogtreecommitdiffhomepage
path: root/src/crypto/zinc
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-09-27 02:20:11 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-10-02 03:41:49 +0200
commit488b7567098aee76b3d55e4bc6d4e642fb2e526d (patch)
treeb0d19349b2e841df1b794253613b7e7f302fe0b5 /src/crypto/zinc
parentcfa6a82310de91038a153a2b5d011d5f08573285 (diff)
chacha20: break out of zero loops in selftest
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/crypto/zinc')
-rw-r--r--src/crypto/zinc/selftest/chacha20.h5
1 files changed, 5 insertions, 0 deletions
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;
}
}
}