]> git.baikalelectronics.ru Git - kernel.git/commitdiff
crypto: atmel-aes - Drop if with an always false condition
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tue, 5 Jul 2022 20:51:38 +0000 (22:51 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 15 Jul 2022 08:43:20 +0000 (16:43 +0800)
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>
drivers/crypto/atmel-aes.c

index f72c6b3e4ad81e6f763f5c710b5bdd5e3343decb..886bf258544c6d4aed91db938ea2a002b9b01012 100644 (file)
@@ -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);