diff mbox series

[3/7] crypto: atmel-tdes: Drop if with an always false condition

Message ID 20220705205144.131702-3-u.kleine-koenig@pengutronix.de
State Accepted
Commit 515f4fc66bf176b91d24d89deddc18e0be12543f
Headers show
Series None | expand

Commit Message

Uwe Kleine-König July 5, 2022, 8:51 p.m. UTC
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@pengutronix.de>
---
 drivers/crypto/atmel-tdes.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

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);