From: Uwe Kleine-König Date: Thu, 14 Jul 2022 21:28:20 +0000 (+0200) Subject: crypto: keembay-ocs-ecc - Drop if with an always false condition X-Git-Tag: microblaze-v6.1~167^2~13 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=693b8755e1b1dd3c0bc22920a8bf2bd495688909;p=linux-2.6-microblaze.git crypto: keembay-ocs-ecc - 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 ecc_dev is never NULL. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/keembay/keembay-ocs-ecc.c b/drivers/crypto/keembay/keembay-ocs-ecc.c index 5d0785d3f1b5..2269df17514c 100644 --- a/drivers/crypto/keembay/keembay-ocs-ecc.c +++ b/drivers/crypto/keembay/keembay-ocs-ecc.c @@ -976,8 +976,6 @@ static int kmb_ocs_ecc_remove(struct platform_device *pdev) struct ocs_ecc_dev *ecc_dev; ecc_dev = platform_get_drvdata(pdev); - if (!ecc_dev) - return -ENODEV; crypto_unregister_kpp(&ocs_ecdh_p384); crypto_unregister_kpp(&ocs_ecdh_p256);