Commit 31b20bc2 authored by Herbert Xu's avatar Herbert Xu
Browse files

crypto: acomp - Add missing return statements in compress/decompress



The return statements were missing which causes REQ_CHAIN algorithms
to execute twice for every request.

Reported-by: default avatarEric Biggers <ebiggers@kernel.org>
Fixes: 64929fe8 ("crypto: acomp - Remove request chaining")
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent da4cb617
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -292,7 +292,7 @@ int crypto_acomp_compress(struct acomp_req *req)
	if (acomp_req_on_stack(req) && acomp_is_async(tfm))
		return -EAGAIN;
	if (crypto_acomp_req_chain(tfm) || acomp_request_issg(req))
		crypto_acomp_reqtfm(req)->compress(req);
		return crypto_acomp_reqtfm(req)->compress(req);
	return acomp_do_req_chain(req, true);
}
EXPORT_SYMBOL_GPL(crypto_acomp_compress);
@@ -304,7 +304,7 @@ int crypto_acomp_decompress(struct acomp_req *req)
	if (acomp_req_on_stack(req) && acomp_is_async(tfm))
		return -EAGAIN;
	if (crypto_acomp_req_chain(tfm) || acomp_request_issg(req))
		crypto_acomp_reqtfm(req)->decompress(req);
		return crypto_acomp_reqtfm(req)->decompress(req);
	return acomp_do_req_chain(req, false);
}
EXPORT_SYMBOL_GPL(crypto_acomp_decompress);