[PATCH 3/7] crypto: atmel-tdes: Drop if with an always false condition
Uwe Kleine-König
u.kleine-koenig at pengutronix.de
Tue Jul 5 13:51:40 PDT 2022
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 tdes_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 at pengutronix.de>
---
drivers/crypto/atmel-tdes.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/crypto/atmel-tdes.c b/drivers/crypto/atmel-tdes.c
index 9fd7b8e439d2..a5e78aa08bf0 100644
--- a/drivers/crypto/atmel-tdes.c
+++ b/drivers/crypto/atmel-tdes.c
@@ -1266,8 +1266,7 @@ static int atmel_tdes_remove(struct platform_device *pdev)
struct atmel_tdes_dev *tdes_dd;
tdes_dd = platform_get_drvdata(pdev);
- if (!tdes_dd)
- return -ENODEV;
+
spin_lock(&atmel_tdes.lock);
list_del(&tdes_dd->list);
spin_unlock(&atmel_tdes.lock);
--
2.36.1
More information about the linux-arm-kernel
mailing list