crypto: inside-secure - remove useless check

When sending an ahash request, the code checks for the extra variable
not to be 0. This check is useless as the extra variable can't be 0 at
this point (it is checked on the line just before).

This patch does not modify the driver behaviour in any way.

Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
Antoine Tenart 2019-05-27 16:50:56 +02:00 committed by Herbert Xu
parent 0733eabadc
commit 709ecc101a
1 changed files with 9 additions and 11 deletions

View File

@ -230,7 +230,6 @@ static int safexcel_ahash_send_req(struct crypto_async_request *async, int ring,
if (!extra) if (!extra)
extra = crypto_ahash_blocksize(ahash); extra = crypto_ahash_blocksize(ahash);
if (extra) {
sg_pcopy_to_buffer(areq->src, sg_nents(areq->src), sg_pcopy_to_buffer(areq->src, sg_nents(areq->src),
req->cache_next, extra, req->cache_next, extra,
areq->nbytes - extra); areq->nbytes - extra);
@ -244,7 +243,6 @@ static int safexcel_ahash_send_req(struct crypto_async_request *async, int ring,
return 0; return 0;
} }
} }
}
/* Add a command descriptor for the cached data, if any */ /* Add a command descriptor for the cached data, if any */
if (cache_len) { if (cache_len) {