summaryrefslogtreecommitdiff
path: root/security/keys/trusted-keys/trusted_tpm2.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/keys/trusted-keys/trusted_tpm2.c')
-rw-r--r--security/keys/trusted-keys/trusted_tpm2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/security/keys/trusted-keys/trusted_tpm2.c b/security/keys/trusted-keys/trusted_tpm2.c
index 617fabd4d913..0165da386289 100644
--- a/security/keys/trusted-keys/trusted_tpm2.c
+++ b/security/keys/trusted-keys/trusted_tpm2.c
@@ -336,9 +336,9 @@ out:
rc = -EPERM;
}
if (blob_len < 0)
- return blob_len;
-
- payload->blob_len = blob_len;
+ rc = blob_len;
+ else
+ payload->blob_len = blob_len;
tpm_put_ops(chip);
return rc;