crypto: jitterentropy – Delete unnecessary checks before the function call “kzfree”

Author: Markus Elfring <elfring@users.sourceforge.net>

The kzfree() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring 
Signed-off-by: Herbert Xu 
---
 crypto/jitterentropy.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
 
diff --git a/crypto/jitterentropy.c b/crypto/jitterentropy.c
index 6dfb220..acf44b2 100644
--- a/crypto/jitterentropy.c
+++ b/crypto/jitterentropy.c
@@ -653,11 +653,9 @@ struct rand_data *jent_entropy_collector_alloc(unsigned int osr,
 
 void jent_entropy_collector_free(struct rand_data *entropy_collector)
 {
-	if (entropy_collector->mem)
-		jent_zfree(entropy_collector->mem);
+	jent_zfree(entropy_collector->mem);
 	entropy_collector->mem = NULL;
-	if (entropy_collector)
-		jent_zfree(entropy_collector);
+	jent_zfree(entropy_collector);
 	entropy_collector = NULL;
 }