aboutsummaryrefslogtreecommitdiffstats
path: root/include/crypto/internal/scompress.h
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2019-12-15 15:51:19 -0800
committerHerbert Xu <herbert@gondor.apana.org.au>2019-12-20 14:58:35 +0800
commitc6d633a927499f35a06455a960ad6b5a59c87c2c (patch)
tree3e0ac15490f96bd4e5570f8f2e3613d10caced90 /include/crypto/internal/scompress.h
parentcrypto: arm64 - Use modern annotations for assembly functions (diff)
downloadlinux-dev-c6d633a927499f35a06455a960ad6b5a59c87c2c.tar.xz
linux-dev-c6d633a927499f35a06455a960ad6b5a59c87c2c.zip
crypto: algapi - make unregistration functions return void
Some of the algorithm unregistration functions return -ENOENT when asked to unregister a non-registered algorithm, while others always return 0 or always return void. But no users check the return value, except for two of the bulk unregistration functions which print a message on error but still always return 0 to their caller, and crypto_del_alg() which calls crypto_unregister_instance() which always returns 0. Since unregistering a non-registered algorithm is always a kernel bug but there isn't anything callers should do to handle this situation at runtime, let's simplify things by making all the unregistration functions return void, and moving the error message into crypto_unregister_alg() and upgrading it to a WARN(). Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto/internal/scompress.h')
-rw-r--r--include/crypto/internal/scompress.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/include/crypto/internal/scompress.h b/include/crypto/internal/scompress.h
index 6727ef0fc4d1..f834274c2493 100644
--- a/include/crypto/internal/scompress.h
+++ b/include/crypto/internal/scompress.h
@@ -112,10 +112,8 @@ int crypto_register_scomp(struct scomp_alg *alg);
* compression algorithm
*
* @alg: algorithm definition
- *
- * Return: zero on success; error code in case of error
*/
-int crypto_unregister_scomp(struct scomp_alg *alg);
+void crypto_unregister_scomp(struct scomp_alg *alg);
int crypto_register_scomps(struct scomp_alg *algs, int count);
void crypto_unregister_scomps(struct scomp_alg *algs, int count);