提交 1ed2002f 编写于 作者: Z Zhou Wang 提交者: Herbert Xu

crypto: hisilicon - fix error handle in hisi_zip_create_req_q

Directly return error in the first loop in hisi_zip_create_req_q.

Fixes: 62c455ca ("crypto: hisilicon - add HiSilicon ZIP accelerator support")
Signed-off-by: NZhou Wang <wangzhou1@hisilicon.com>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 902f0bab
...@@ -223,8 +223,10 @@ static int hisi_zip_create_req_q(struct hisi_zip_ctx *ctx) ...@@ -223,8 +223,10 @@ static int hisi_zip_create_req_q(struct hisi_zip_ctx *ctx)
sizeof(long), GFP_KERNEL); sizeof(long), GFP_KERNEL);
if (!req_q->req_bitmap) { if (!req_q->req_bitmap) {
ret = -ENOMEM; ret = -ENOMEM;
if (i == 1) if (i == 0)
goto err_free_loop0; return ret;
goto err_free_loop0;
} }
rwlock_init(&req_q->req_lock); rwlock_init(&req_q->req_lock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册