aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/zstd.c
diff options
context:
space:
mode:
authorSuman Kumar Chakraborty <suman.kumar.chakraborty@intel.com>2025-06-30 10:24:18 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2025-07-10 20:15:41 +1200
commit03ba056e63d3b2d3774c7a8cf40f5a31b968b612 (patch)
treeb3082aef86b07106d06b557a525cbfd4c45fb7ca /crypto/zstd.c
parent181698af38d3f93381229ad89c09b5bd0496661a (diff)
downloadnet-03ba056e63d3b2d3774c7a8cf40f5a31b968b612.tar.gz
crypto: zstd - fix duplicate check warning
Fix the following warnings reported by the static analyzer Smatch: crypto/zstd.c:273 zstd_decompress() warn: duplicate check 'scur' (previous on line 235) Fixes: f5ad93ffb541 ("crypto: zstd - convert to acomp") Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Closes: https://lore.kernel.org/linux-crypto/92929e50-5650-40be-8c0a-de81e77f0acf@sabinyo.mountain/ Signed-off-by: Suman Kumar Chakraborty <suman.kumar.chakraborty@intel.com> Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/zstd.c')
-rw-r--r--crypto/zstd.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/crypto/zstd.c b/crypto/zstd.c
index 657e0cf7b95242..24edb4d616b56d 100644
--- a/crypto/zstd.c
+++ b/crypto/zstd.c
@@ -268,10 +268,9 @@ static int zstd_decompress(struct acomp_req *req)
total_out += outbuf.pos;
acomp_walk_done_dst(&walk, outbuf.pos);
- } while (scur != inbuf.pos);
+ } while (inbuf.pos != scur);
- if (scur)
- acomp_walk_done_src(&walk, scur);
+ acomp_walk_done_src(&walk, scur);
} while (ret == 0);
out: