summaryrefslogtreecommitdiffhomepage
path: root/src/crypto/zinc/blake2s/blake2s.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/blake2s/blake2s.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/blake2s/blake2s.c')
-rw-r--r--src/crypto/zinc/blake2s/blake2s.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/crypto/zinc/blake2s/blake2s.c b/src/crypto/zinc/blake2s/blake2s.c
index 8e22824..9517c33 100644
--- a/src/crypto/zinc/blake2s/blake2s.c
+++ b/src/crypto/zinc/blake2s/blake2s.c
@@ -291,7 +291,7 @@ static int __init mod_init(void)
if (!nosimd)
blake2s_fpu_init();
#ifdef CONFIG_ZINC_SELFTEST
- if (!blake2s_selftest())
+ if (WARN_ON(!blake2s_selftest()))
return -ENOTRECOVERABLE;
#endif
return 0;