linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] crypto: deflate - Remove useless call "zlib_inflateEnd"
@ 2021-03-31  3:34 Jiapeng Chong
  2021-04-09  7:19 ` Herbert Xu
  0 siblings, 1 reply; 2+ messages in thread
From: Jiapeng Chong @ 2021-03-31  3:34 UTC (permalink / raw)
  To: herbert; +Cc: davem, linux-crypto, linux-kernel, Jiapeng Chong

Fix the following whitescan warning:

Calling "zlib_inflateEnd(&ctx->decomp_stream)" is only useful for its
return value, which is ignored.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 crypto/deflate.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/crypto/deflate.c b/crypto/deflate.c
index b2a46f6..cac1672 100644
--- a/crypto/deflate.c
+++ b/crypto/deflate.c
@@ -101,7 +101,6 @@ static void deflate_comp_exit(struct deflate_ctx *ctx)
 
 static void deflate_decomp_exit(struct deflate_ctx *ctx)
 {
-	zlib_inflateEnd(&ctx->decomp_stream);
 	vfree(ctx->decomp_stream.workspace);
 }
 
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] crypto: deflate - Remove useless call "zlib_inflateEnd"
  2021-03-31  3:34 [PATCH] crypto: deflate - Remove useless call "zlib_inflateEnd" Jiapeng Chong
@ 2021-04-09  7:19 ` Herbert Xu
  0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2021-04-09  7:19 UTC (permalink / raw)
  To: Jiapeng Chong; +Cc: davem, linux-crypto, linux-kernel

On Wed, Mar 31, 2021 at 11:34:57AM +0800, Jiapeng Chong wrote:
> Fix the following whitescan warning:
> 
> Calling "zlib_inflateEnd(&ctx->decomp_stream)" is only useful for its
> return value, which is ignored.
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> ---
>  crypto/deflate.c | 1 -
>  1 file changed, 1 deletion(-)

The function might not do anything today but the documentation
clearly indicates that it could free any dynamically allocated
data so it should stay.

Cheers,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-09  7:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-31  3:34 [PATCH] crypto: deflate - Remove useless call "zlib_inflateEnd" Jiapeng Chong
2021-04-09  7:19 ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).