Commit 1ed2002f authored by Zhou Wang's avatar Zhou Wang Committed by Herbert Xu
Browse files

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: default avatarZhou Wang <wangzhou1@hisilicon.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 902f0bab
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -223,7 +223,9 @@ static int hisi_zip_create_req_q(struct hisi_zip_ctx *ctx)
					    sizeof(long), GFP_KERNEL);
		if (!req_q->req_bitmap) {
			ret = -ENOMEM;
			if (i == 1)
			if (i == 0)
				return ret;

			goto err_free_loop0;
		}
		rwlock_init(&req_q->req_lock);