]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/shared/cryptsetup-tpm2.c
Merge pull request #32902 from yuwata/emergency-action-fixes
[thirdparty/systemd.git] / src / shared / cryptsetup-tpm2.c
index ee664a95a1abab21815d993457d4e0597fe93b3e..335bb2eb89045f5b3a7bbbd6ca6df838d7b51691 100644 (file)
@@ -143,9 +143,9 @@ int acquire_tpm2_key(
         }
 
         _cleanup_(tpm2_context_unrefp) Tpm2Context *tpm2_context = NULL;
-        r = tpm2_context_new(device, &tpm2_context);
+        r = tpm2_context_new_or_warn(device, &tpm2_context);
         if (r < 0)
-                return log_error_errno(r, "Failed to create TPM2 context: %m");
+                return r;
 
         if (!(flags & TPM2_FLAGS_USE_PIN)) {
                 r = tpm2_unseal(tpm2_context,