Skip to content

Commit

Permalink
crypto: caam/qi2 - remove redundant assignment to ret
Browse files Browse the repository at this point in the history
The variable ret is being assigned a value that is never read, the
error exit path via label 'unmap' returns -ENOMEM anyhow, so assigning
ret with -ENOMEM is redundamt.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
Colin Ian King authored and Herbert Xu committed Jun 18, 2020
1 parent 2919523 commit c31b4ad
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/crypto/caam/caamalg_qi2.c
Original file line number Diff line number Diff line change
Expand Up @@ -4044,7 +4044,6 @@ static int ahash_finup_no_ctx(struct ahash_request *req)
DMA_TO_DEVICE);
if (dma_mapping_error(ctx->dev, edesc->qm_sg_dma)) {
dev_err(ctx->dev, "unable to map S/G table\n");
ret = -ENOMEM;
goto unmap;
}
edesc->qm_sg_bytes = qm_sg_bytes;
Expand All @@ -4055,7 +4054,6 @@ static int ahash_finup_no_ctx(struct ahash_request *req)
if (dma_mapping_error(ctx->dev, state->ctx_dma)) {
dev_err(ctx->dev, "unable to map ctx\n");
state->ctx_dma = 0;
ret = -ENOMEM;
goto unmap;
}

Expand Down

0 comments on commit c31b4ad

Please sign in to comment.