aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/crypto/zinc/chacha20poly1305.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/crypto/zinc/chacha20poly1305.c')
-rw-r--r--src/crypto/zinc/chacha20poly1305.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/crypto/zinc/chacha20poly1305.c b/src/crypto/zinc/chacha20poly1305.c
index 6c8ff3a..6f709e0 100644
--- a/src/crypto/zinc/chacha20poly1305.c
+++ b/src/crypto/zinc/chacha20poly1305.c
@@ -10,6 +10,8 @@
#include <zinc/chacha20poly1305.h>
#include <zinc/chacha20.h>
#include <zinc/poly1305.h>
+#include "selftest/run.h"
+
#include <asm/unaligned.h>
#include <linux/kernel.h>
#include <linux/module.h>
@@ -347,10 +349,9 @@ int __init chacha20poly1305_mod_init(void)
static int __init mod_init(void)
#endif
{
-#ifdef CONFIG_ZINC_SELFTEST
- if (WARN_ON(!chacha20poly1305_selftest()))
+ if (!selftest_run("chacha20poly1305", chacha20poly1305_selftest,
+ NULL, 0))
return -ENOTRECOVERABLE;
-#endif
return 0;
}