diff options
author | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> | 2017-10-12 16:35:36 +0200 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> | 2017-10-12 16:35:36 +0200 |
commit | 1ca96e9695b6c448befcd0abacaf473458f22d1c (patch) | |
tree | 9ba289bdd8831b061743a8d48b13e6128306b8f1 /crypto/ahash.c | |
parent | aa0bfc9cee13677f110cfb870f7b5d9cd60cf5a7 (diff) | |
parent | 508f8d23a372beae647185ce896a0c1109406b83 (diff) | |
download | linux-crypto-1ca96e9695b6c448befcd0abacaf473458f22d1c.tar.gz linux-crypto-1ca96e9695b6c448befcd0abacaf473458f22d1c.zip |
Merge tag 'v4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into fbdev-for-next
Linux 4.14-rc4
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) { |