Skip to content

Commit

Permalink
crypto: xcbc - 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 3b3fc32 commit b5ebd44
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crypto/xcbc.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ static int xcbc_create(struct crypto_template *tmpl, struct rtattr **tb)
}

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

Expand Down

0 comments on commit b5ebd44

Please sign in to comment.