diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2022-04-28 19:11:45 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2022-05-06 18:16:55 +0800 |
commit | 384e9aa77ae6b0575631ea3100563a9fe44b0e77 (patch) | |
tree | d6140c5c81086c589d4e09adc3c8086ce80924f6 | |
parent | 580c8619698f2c4af4c81abc2a26641d4162d9b3 (diff) |
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.c | 3 |
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; } |