Skip to content

Commit

Permalink
crypto: tcrypt - Fix module return code when testing by name
Browse files Browse the repository at this point in the history
We should return 0/-ENOENT instead of 1/0 when testing by name.

Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
herbertx committed Jun 19, 2009
1 parent 2730017 commit ea40065
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypto/tcrypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ea40065

Please sign in to comment.