tpm: remove external calls to dlopen_tpm2()

The calls outside tpm2-util.c are redundant, as tpm2_context_new()
is always called immediately after, which then calls dlopen_tpm2().
This commit is contained in:
Dan Streetman
2023-05-31 09:23:21 -04:00
parent 2533fdd0fb
commit 9944909e68
2 changed files with 0 additions and 8 deletions
-4
View File
@@ -341,10 +341,6 @@ static int run(int argc, char *argv[]) {
return EXIT_SUCCESS;
}
r = dlopen_tpm2();
if (r < 0)
return log_error_errno(r, "Failed to load TPM2 libraries: %m");
_cleanup_tpm2_context_ Tpm2Context *c = NULL;
r = tpm2_context_new(arg_tpm2_device, &c);
if (r < 0)
-4
View File
@@ -832,10 +832,6 @@ static int measure_volume_key(
}
#if HAVE_TPM2
r = dlopen_tpm2();
if (r < 0)
return log_error_errno(r, "Failed to load TPM2 libraries: %m");
_cleanup_tpm2_context_ Tpm2Context *c = NULL;
r = tpm2_context_new(arg_tpm2_device, &c);
if (r < 0)