From: James Bottomley Date: Thu, 22 Apr 2021 02:45:44 +0000 (-0700) Subject: Merge branch 'tpmdd-fixes' into tpmdd-for-next X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=69977d1aeeca7b18001ef462002f20b5f0e89e8b;p=users%2Fjedix%2Flinux-maple.git Merge branch 'tpmdd-fixes' into tpmdd-for-next --- 69977d1aeeca7b18001ef462002f20b5f0e89e8b diff --cc security/keys/trusted-keys/trusted_tpm2.c index d225ad140960a,c87c4df8703d4..617fabd4d913b --- a/security/keys/trusted-keys/trusted_tpm2.c +++ b/security/keys/trusted-keys/trusted_tpm2.c @@@ -245,10 -79,7 +245,10 @@@ int tpm2_seal_trusted(struct tpm_chip * if (i == ARRAY_SIZE(tpm2_hash_map)) return -EINVAL; + if (!options->keyhandle) + return -EINVAL; + - rc = tpm_buf_init(&buf, TPM2_ST_SESSIONS, TPM2_CC_CREATE); + rc = tpm_try_get_ops(chip); if (rc) return rc;