summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2022-04-28 20:11:45 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2022-05-06 13:16:55 +0300
commit384e9aa77ae6b0575631ea3100563a9fe44b0e77 (patch)
treed6140c5c81086c589d4e09adc3c8086ce80924f6
parent580c8619698f2c4af4c81abc2a26641d4162d9b3 (diff)
downloadlinux-384e9aa77ae6b0575631ea3100563a9fe44b0e77.tar.xz
crypto: atmel-sha204a - Remove useless check
kfree(NULL) is a noop, so there is no win in checking a pointer before kfreeing it. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--drivers/crypto/atmel-sha204a.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/crypto/atmel-sha204a.c b/drivers/crypto/atmel-sha204a.c
index 3a03f4aaf100..9f70f4345b12 100644
--- a/drivers/crypto/atmel-sha204a.c
+++ b/drivers/crypto/atmel-sha204a.c
@@ -125,8 +125,7 @@ static int atmel_sha204a_remove(struct i2c_client *client)
return -EBUSY;
}
- if (i2c_priv->hwrng.priv)
- kfree((void *)i2c_priv->hwrng.priv);
+ kfree((void *)i2c_priv->hwrng.priv);
return 0;
}