diff mbox series

crypto: ccm - use local variables instead of indirect references

Message ID 20220926091421.98708-1-tianjia.zhang@linux.alibaba.com (mailing list archive)
State Accepted
Delegated to: Herbert Xu
Headers show
Series crypto: ccm - use local variables instead of indirect references | expand

Commit Message

tianjia.zhang Sept. 26, 2022, 9:14 a.m. UTC
The variable odata has been introduced into the function scope as
a variable and should be used directly.

Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
---
 crypto/ccm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Herbert Xu Oct. 21, 2022, 11:32 a.m. UTC | #1
On Mon, Sep 26, 2022 at 05:14:21PM +0800, Tianjia Zhang wrote:
> The variable odata has been introduced into the function scope as
> a variable and should be used directly.
> 
> Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
> ---
>  crypto/ccm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Patch applied.  Thanks.
diff mbox series

Patch

diff --git a/crypto/ccm.c b/crypto/ccm.c
index 6b815ece51c6..30dbae72728f 100644
--- a/crypto/ccm.c
+++ b/crypto/ccm.c
@@ -218,7 +218,7 @@  static int crypto_ccm_auth(struct aead_request *req, struct scatterlist *plain,
 		cryptlen += ilen;
 	}
 
-	ahash_request_set_crypt(ahreq, plain, pctx->odata, cryptlen);
+	ahash_request_set_crypt(ahreq, plain, odata, cryptlen);
 	err = crypto_ahash_finup(ahreq);
 out:
 	return err;