summaryrefslogtreecommitdiff
path: root/crypto/xcbc.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2009-07-15 16:53:33 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2009-07-15 16:53:33 +0800
commitd81c7d3904d88e2706b883d1d93637b0b6ddf5dc (patch)
tree68859575280b3168d1058c4815c737b7b78a122c /crypto/xcbc.c
parentcbf01eff084caf08d035c2a6dec4213a6f4885d0 (diff)
downloadlinux-crypto-d81c7d3904d88e2706b883d1d93637b0b6ddf5dc.tar.gz
linux-crypto-d81c7d3904d88e2706b883d1d93637b0b6ddf5dc.zip
crypto: xcbc - Fix incorrect error value when creating instance
If shash_alloc_instance() fails, we return the wrong error value. This patch fixes it. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/xcbc.c')
-rw-r--r--crypto/xcbc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/xcbc.c b/crypto/xcbc.c
index b2cc8551..3b991bf2 100644
--- a/crypto/xcbc.c
+++ b/crypto/xcbc.c
@@ -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;