Skip to content

Commit

Permalink
crypto: hmac - Fix incorrect error value when creating instance
Browse files Browse the repository at this point in the history
If shash_alloc_instance() fails, we return the wrong error value.
This patch fixes it.

Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
herbertx committed Jul 15, 2009
1 parent 05ed875 commit 3b3fc32
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crypto/hmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ static int hmac_create(struct crypto_template *tmpl, struct rtattr **tb)
goto out_put_alg;

inst = shash_alloc_instance("hmac", alg);
err = PTR_ERR(inst);
if (IS_ERR(inst))
goto out_put_alg;

Expand Down

0 comments on commit 3b3fc32

Please sign in to comment.