Skip to content

Commit

Permalink
crypto: keembay-ocs-ecc - Drop if with an always false condition
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
Uwe Kleine-König authored and herbertx committed Jul 22, 2022
1 parent 1b466b8 commit 693b875
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/crypto/keembay/keembay-ocs-ecc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 693b875

Please sign in to comment.