From 211ebb51da7ccd18d0caf88d6f1a4adc35e86a7b Mon Sep 17 00:00:00 2001 From: Janos Follath Date: Tue, 6 Aug 2024 08:07:36 +0100 Subject: [PATCH] Don't return success on a stub We shouldn't return PSA_SUCCESS from a function that isn't implemented. PSA_ERROR_NOT_SUPPORTED seems like the most appropriate return status for a function that isn't implemented. Signed-off-by: Janos Follath --- tf-psa-crypto/core/psa_crypto_ecp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tf-psa-crypto/core/psa_crypto_ecp.c b/tf-psa-crypto/core/psa_crypto_ecp.c index 77bc0b2142..749e11be03 100644 --- a/tf-psa-crypto/core/psa_crypto_ecp.c +++ b/tf-psa-crypto/core/psa_crypto_ecp.c @@ -610,7 +610,7 @@ psa_status_t psa_generate_key_iop_setup( (void) operation; (void) attributes; - return PSA_SUCCESS; + return PSA_ERROR_NOT_SUPPORTED; } psa_status_t psa_generate_key_iop_complete( @@ -620,7 +620,7 @@ psa_status_t psa_generate_key_iop_complete( (void) operation; (void) key; - return PSA_SUCCESS; + return PSA_ERROR_NOT_SUPPORTED; } psa_status_t psa_generate_key_iop_abort( @@ -628,7 +628,7 @@ psa_status_t psa_generate_key_iop_abort( { (void) operation; - return PSA_SUCCESS; + return PSA_ERROR_NOT_SUPPORTED; } /****************************************************************/