summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2009-06-19 20:37:00 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2009-06-19 20:37:00 +0800
commitea4006576945195ed35824acfb4007ca7cb78b70 (patch)
tree56cc0724ba883055696b5c223a4dc3ec10b573f9
parent27300176d75e4723e2125e745a98a77bf0133f72 (diff)
downloadlinux-3.10-ea4006576945195ed35824acfb4007ca7cb78b70.tar.gz
linux-3.10-ea4006576945195ed35824acfb4007ca7cb78b70.tar.bz2
linux-3.10-ea4006576945195ed35824acfb4007ca7cb78b70.zip
crypto: tcrypt - Fix module return code when testing by name
We should return 0/-ENOENT instead of 1/0 when testing by name. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--crypto/tcrypt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c
index dfeec0c544c..a890a6792c7 100644
--- a/crypto/tcrypt.c
+++ b/crypto/tcrypt.c
@@ -889,7 +889,7 @@ static int do_test(int m)
static int do_alg_test(const char *alg, u32 type)
{
- return crypto_has_alg(alg, type, CRYPTO_ALG_TYPE_MASK);
+ return crypto_has_alg(alg, type, CRYPTO_ALG_TYPE_MASK) ? 0 : -ENOENT;
}
static int __init tcrypt_mod_init(void)