aboutsummaryrefslogtreecommitdiff
path: root/core/tee
diff options
context:
space:
mode:
authorDaniel McIlvaney <damcilva@microsoft.com>2018-10-12 13:35:24 -0700
committerJérôme Forissier <jerome.forissier@linaro.org>2018-10-23 17:04:14 +0200
commitdaaf4f11ca8f6b033171d78e3384f4abce0e04bc (patch)
treeeedaf1e135118da379875352dc9c1fdf1fe22a77 /core/tee
parent17c90f14495241a6c7a0a67221a9d3e5461ee0e6 (diff)
core: modify tee_otp_get_hw_unique_key to return TEE_Result
Getting the hardware key can fail on some platforms. Modify the function signature to return an appropriate error code. Signed-off-by: Daniel McIlvaney <damcilva@microsoft.com> Signed-off-by: Jordan Rhee <jordanrh@microsoft.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Diffstat (limited to 'core/tee')
-rw-r--r--core/tee/tee_rpmb_fs.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/core/tee/tee_rpmb_fs.c b/core/tee/tee_rpmb_fs.c
index 94dbb275..7ae604d6 100644
--- a/core/tee/tee_rpmb_fs.c
+++ b/core/tee/tee_rpmb_fs.c
@@ -281,17 +281,13 @@ out:
*
* Maybe tee_get_hw_unique_key() should be exposed as
* generic API for getting hw unique key!
- * We should change the API tee_otp_get_hw_unique_key()
- * to return error code!
*/
static TEE_Result tee_get_hw_unique_key(struct tee_hw_unique_key *hwkey)
{
if (!hwkey)
return TEE_ERROR_BAD_PARAMETERS;
- tee_otp_get_hw_unique_key(hwkey);
-
- return TEE_SUCCESS;
+ return tee_otp_get_hw_unique_key(hwkey);
}
static TEE_Result tee_rpmb_key_gen(uint16_t dev_id __unused,