summaryrefslogtreecommitdiffstats
path: root/drivers/crypto
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2022-07-05 22:51:38 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2022-07-15 16:43:20 +0800
commit4fdcabb86ab17621b54695e5bb52ceddef434e82 (patch)
treeefc28c220ef05dd4ff6b6a44eada10acc5a7dc89 /drivers/crypto
parent30fb034361ff1b9bfc569b2d8d66b544ea3eb18f (diff)
downloadlinux-4fdcabb86ab17621b54695e5bb52ceddef434e82.tar.bz2
crypto: atmel-aes - Drop if with an always false condition
The remove callback is only called after probe completed successfully. In this case platform_set_drvdata() was called with a non-NULL argument and so aes_dd is never NULL. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/atmel-aes.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/crypto/atmel-aes.c b/drivers/crypto/atmel-aes.c
index f72c6b3e4ad8..886bf258544c 100644
--- a/drivers/crypto/atmel-aes.c
+++ b/drivers/crypto/atmel-aes.c
@@ -2669,8 +2669,7 @@ static int atmel_aes_remove(struct platform_device *pdev)
struct atmel_aes_dev *aes_dd;
aes_dd = platform_get_drvdata(pdev);
- if (!aes_dd)
- return -ENODEV;
+
spin_lock(&atmel_aes.lock);
list_del(&aes_dd->list);
spin_unlock(&atmel_aes.lock);