mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 13:11:40 +00:00
crypto: talitos - Use the defined variable to clean code
Use the defined variable "dev" to make the code cleaner. Signed-off-by: jianchunfu <jianchunfu@cmss.chinamobile.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
f1da27b7c4
commit
854e25a6d6
@ -1999,7 +1999,7 @@ static int ahash_process_req(struct ahash_request *areq, unsigned int nbytes)
|
||||
/* Buffer up to one whole block */
|
||||
nents = sg_nents_for_len(areq->src, nbytes);
|
||||
if (nents < 0) {
|
||||
dev_err(ctx->dev, "Invalid number of src SG.\n");
|
||||
dev_err(dev, "Invalid number of src SG.\n");
|
||||
return nents;
|
||||
}
|
||||
sg_copy_to_buffer(areq->src, nents,
|
||||
@ -2040,7 +2040,7 @@ static int ahash_process_req(struct ahash_request *areq, unsigned int nbytes)
|
||||
offset = nbytes_to_hash - req_ctx->nbuf;
|
||||
nents = sg_nents_for_len(areq->src, offset);
|
||||
if (nents < 0) {
|
||||
dev_err(ctx->dev, "Invalid number of src SG.\n");
|
||||
dev_err(dev, "Invalid number of src SG.\n");
|
||||
return nents;
|
||||
}
|
||||
sg_copy_to_buffer(areq->src, nents,
|
||||
@ -2054,7 +2054,7 @@ static int ahash_process_req(struct ahash_request *areq, unsigned int nbytes)
|
||||
if (to_hash_later) {
|
||||
nents = sg_nents_for_len(areq->src, nbytes);
|
||||
if (nents < 0) {
|
||||
dev_err(ctx->dev, "Invalid number of src SG.\n");
|
||||
dev_err(dev, "Invalid number of src SG.\n");
|
||||
return nents;
|
||||
}
|
||||
sg_pcopy_to_buffer(areq->src, nents,
|
||||
|
Loading…
Reference in New Issue
Block a user