From 411bbf2867f4d6cb00570827daf5c5068185ea17 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 Signed-off-by: Jason A. Donenfeld --- src/crypto/zinc/curve25519/curve25519.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/crypto/zinc/curve25519') diff --git a/src/crypto/zinc/curve25519/curve25519.c b/src/crypto/zinc/curve25519/curve25519.c index 6b1b18e..87fe860 100644 --- a/src/crypto/zinc/curve25519/curve25519.c +++ b/src/crypto/zinc/curve25519/curve25519.c @@ -99,7 +99,7 @@ static int __init mod_init(void) if (!nosimd) curve25519_fpu_init(); #ifdef CONFIG_ZINC_SELFTEST - if (!curve25519_selftest()) + if (WARN_ON(!curve25519_selftest())) return -ENOTRECOVERABLE; #endif return 0; -- cgit v1.2.3