summaryrefslogtreecommitdiffhomepage
path: root/src/crypto/zinc/chacha20/chacha20.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-09-29 05:11:24 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-10-02 03:41:49 +0200
commit411bbf2867f4d6cb00570827daf5c5068185ea17 (patch)
tree7563f5efcf598e879a9dacba9aff91e83eeee97d /src/crypto/zinc/chacha20/chacha20.c
parent0bdf893c13cdf534911487a533d9cc814b7fa906 (diff)
crypto: WARN_ON in module_init if selftest fails
If it's a built-in and initcall fails, it won't be fatal. So we should at least be loud. Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/crypto/zinc/chacha20/chacha20.c')
-rw-r--r--src/crypto/zinc/chacha20/chacha20.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/crypto/zinc/chacha20/chacha20.c b/src/crypto/zinc/chacha20/chacha20.c
index c767e02..e71e702 100644
--- a/src/crypto/zinc/chacha20/chacha20.c
+++ b/src/crypto/zinc/chacha20/chacha20.c
@@ -172,7 +172,7 @@ static int __init mod_init(void)
if (!nosimd)
chacha20_fpu_init();
#ifdef CONFIG_ZINC_SELFTEST
- if (!chacha20_selftest())
+ if (WARN_ON(!chacha20_selftest()))
return -ENOTRECOVERABLE;
#endif
return 0;