diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2022-07-05 22:51:38 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2022-07-15 16:43:20 +0800 |
commit | 4fdcabb86ab17621b54695e5bb52ceddef434e82 (patch) | |
tree | efc28c220ef05dd4ff6b6a44eada10acc5a7dc89 /drivers/crypto | |
parent | 30fb034361ff1b9bfc569b2d8d66b544ea3eb18f (diff) | |
download | linux-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.c | 3 |
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); |