2023-09-12 04:49:39

by Li zeming

[permalink] [raw]
Subject: [PATCH] crypto/api: Remove unnecessary ‘NULL’ values from tfm

tfm is assigned first, so it does not need to initialize
the assignment.

Signed-off-by: Li zeming <[email protected]>
---
crypto/api.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/crypto/api.c b/crypto/api.c
index b9cc0c906efe..7f402107f0cc 100644
--- a/crypto/api.c
+++ b/crypto/api.c
@@ -389,7 +389,7 @@ EXPORT_SYMBOL_GPL(crypto_shoot_alg);
struct crypto_tfm *__crypto_alloc_tfmgfp(struct crypto_alg *alg, u32 type,
u32 mask, gfp_t gfp)
{
- struct crypto_tfm *tfm = NULL;
+ struct crypto_tfm *tfm;
unsigned int tfm_size;
int err = -ENOMEM;

--
2.18.2


2023-09-20 05:24:22

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH] crypto/api: Remove u nnecessary ‘NULL’ values from tfm

On Thu, Sep 14, 2023 at 02:17:27AM +0800, Li zeming wrote:
> tfm is assigned first, so it does not need to initialize
> the assignment.
>
> Signed-off-by: Li zeming <[email protected]>
> ---
> crypto/api.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

Patch applied. Thanks.
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt