crypto: starfive: Remove unneeded NULL checks
Subsystems (2)
Jia Jie Ho
maintainerPATCH 1/1 crypto: starfive: Remove unneeded NULL checks
NULL check before kfree_sensitive function is not needed.
Signed-off-by Jia Jie Ho <[email protected]>
Reported-by kernel test robot <[email protected]>
--- drivers/crypto/starfive/jh7110-rsa.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
drivers/crypto/starfive/jh7110-rsa.c +3 -6
@@ -45,12 +45,9 @@ static inline int starfive_pka_wait_done(struct starfive_cryp_ctx *ctx)static void starfive_rsa_free_key (struct starfive_rsa_key *key) { -if (key->d) -kfree_sensitive (key->d); -if (key->e) -kfree_sensitive (key->e); -if (key->n) -kfree_sensitive (key->n); +kfree_sensitive (key->d); +kfree_sensitive (key->e); +kfree_sensitive (key->n);memset (key,0 ,sizeof (*key)); }
Signature · 1 line
2.34.1
Herbert Xu
maintainerQuoted 8 lines · Jia Jie Ho
NULL check before
kfree_sensitivefunction is not needed.Signed-off-by Jia Jie Ho <[email protected]>Reported-by kernel test robot <[email protected]>--- drivers/crypto/starfive/jh7110-rsa.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
Patch applied. Thanks.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt