diff options
author | 2018-09-29 05:11:24 +0200 | |
---|---|---|
committer | 2018-10-02 03:41:49 +0200 | |
commit | beaa1135df1655683d8521a7129bb03c55c432d6 (patch) | |
tree | a46c83341e226ea6146c824acae78004b7d54ba4 /src/crypto/zinc/chacha20 | |
parent | simd: refactor simd availability handling (diff) | |
download | wireguard-monolithic-historical-beaa1135df1655683d8521a7129bb03c55c432d6.tar.xz wireguard-monolithic-historical-beaa1135df1655683d8521a7129bb03c55c432d6.zip |
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>
Diffstat (limited to 'src/crypto/zinc/chacha20')
-rw-r--r-- | src/crypto/zinc/chacha20/chacha20.c | 2 |
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; |