Skip to content

Commit b5ebd44

Browse files
committed
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>
1 parent 3b3fc32 commit b5ebd44

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎crypto/xcbc.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ static int xcbc_create(struct crypto_template *tmpl, struct rtattr **tb)
252252
}
253253

254254
inst = shash_alloc_instance("xcbc", alg);
255+
err = PTR_ERR(inst);
255256
if (IS_ERR(inst))
256257
goto out_put_alg;
257258

0 commit comments

Comments
 (0)