diff options
author | Juergen Gross <jgross@suse.com> | 2017-11-13 10:24:50 +0100 |
---|---|---|
committer | Juergen Gross <jgross@suse.com> | 2017-11-13 10:24:50 +0100 |
commit | 40248a5f572a9ee5602fb61b33ddcc7de3b4cf5b (patch) | |
tree | b443b237fa80f2cc8ca8510b63aaa4861ba3ea7a /crypto/ahash.c | |
parent | 4f673910a79f5cb0e7dd87bf807eebb24834cea3 (diff) | |
parent | 37d98457e3c414a1673bf5dce97eb4c79b5cff25 (diff) | |
download | linux-crypto-40248a5f572a9ee5602fb61b33ddcc7de3b4cf5b.tar.gz linux-crypto-40248a5f572a9ee5602fb61b33ddcc7de3b4cf5b.zip |
Merge tag 'v4.14' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
Linux 4.14
Diffstat (limited to '')
-rw-r--r-- | crypto/ahash.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/crypto/ahash.c b/crypto/ahash.c index 826cd7ab..5e8666e6 100644 --- a/crypto/ahash.c +++ b/crypto/ahash.c @@ -588,6 +588,35 @@ int crypto_unregister_ahash(struct ahash_alg *alg) } EXPORT_SYMBOL_GPL(crypto_unregister_ahash); +int crypto_register_ahashes(struct ahash_alg *algs, int count) +{ + int i, ret; + + for (i = 0; i < count; i++) { + ret = crypto_register_ahash(&algs[i]); + if (ret) + goto err; + } + + return 0; + +err: + for (--i; i >= 0; --i) + crypto_unregister_ahash(&algs[i]); + + return ret; +} +EXPORT_SYMBOL_GPL(crypto_register_ahashes); + +void crypto_unregister_ahashes(struct ahash_alg *algs, int count) +{ + int i; + + for (i = count - 1; i >= 0; --i) + crypto_unregister_ahash(&algs[i]); +} +EXPORT_SYMBOL_GPL(crypto_unregister_ahashes); + int ahash_register_instance(struct crypto_template *tmpl, struct ahash_instance *inst) { |