From beaa1135df1655683d8521a7129bb03c55c432d6 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sat, 29 Sep 2018 05:11:24 +0200 Subject: 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 --- src/crypto/zinc/chacha20/chacha20.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/crypto/zinc/chacha20') 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; -- cgit v1.2.3-59-g8ed1b