diff options
author | Horia Geantă <horia.geanta@nxp.com> | 2016-11-09 09:46:15 +0100 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2016-11-13 10:45:09 +0100 |
commit | c530e34140612855ab00f9190a19c41953aa0749 (patch) | |
tree | 0379719583c4e8f4769bca6463e934fa1dd233b4 /drivers/crypto/caam/caamalg.c | |
parent | crypto: caam - fix sparse warnings (diff) | |
download | linux-c530e34140612855ab00f9190a19c41953aa0749.tar.xz linux-c530e34140612855ab00f9190a19c41953aa0749.zip |
crypto: caam - fix smatch warnings
Fix the following smatch warnings:
drivers/crypto/caam/caamalg.c:2350 aead_edesc_alloc() warn: we tested 'src_nents' before and it was 'true'
drivers/crypto/caam/caamrng.c:351 caam_rng_init() error: no modifiers for allocation.
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/caam/caamalg.c')
-rw-r--r-- | drivers/crypto/caam/caamalg.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/crypto/caam/caamalg.c b/drivers/crypto/caam/caamalg.c index 5317d8cad44d..bc433edd34c4 100644 --- a/drivers/crypto/caam/caamalg.c +++ b/drivers/crypto/caam/caamalg.c @@ -2346,10 +2346,8 @@ static struct aead_edesc *aead_edesc_alloc(struct aead_request *req, /* Check if data are contiguous. */ all_contig = !src_nents; - if (!all_contig) { - src_nents = src_nents ? : 1; + if (!all_contig) sec4_sg_len = src_nents; - } sec4_sg_len += dst_nents; |