summaryrefslogtreecommitdiff
path: root/src/cryptenroll
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2023-02-10 18:22:57 +0900
committerLuca Boccassi <luca.boccassi@gmail.com>2023-02-10 10:45:19 +0000
commit645063d1bb309137f884d9c9f01d2b7d01ab2ca8 (patch)
tree65b7ee8032af2ae364c3fddad4e7b61425e8d498 /src/cryptenroll
parentc9853672a030cb27a802fce58e8e8b1fba26cd5d (diff)
downloadsystemd-645063d1bb309137f884d9c9f01d2b7d01ab2ca8.tar.gz
cryptenroll: drop deadcode
Follow-up for b0fc23fae51d244d2c33d70c10003aa5d5840223. After the commit, 'signature_path' is now always non-NULL, hence the condition can be dropped. Fixes CID#1504492.
Diffstat (limited to 'src/cryptenroll')
-rw-r--r--src/cryptenroll/cryptenroll-tpm2.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/cryptenroll/cryptenroll-tpm2.c b/src/cryptenroll/cryptenroll-tpm2.c
index 658db6a523..1052321fdc 100644
--- a/src/cryptenroll/cryptenroll-tpm2.c
+++ b/src/cryptenroll/cryptenroll-tpm2.c
@@ -201,12 +201,8 @@ int enroll_tpm2(struct crypt_device *cd,
* This is optional however, skip it if it's not explicitly provided. */
r = tpm2_load_pcr_signature(signature_path, &signature_json);
- if (r < 0) {
- if (signature_path || r != -ENOENT)
- return log_debug_errno(r, "Failed to read TPM PCR signature: %m");
-
- log_debug_errno(r, "Failed to read TPM2 PCR signature, proceeding without: %m");
- }
+ if (r < 0)
+ return log_debug_errno(r, "Failed to read TPM PCR signature: %m");
}
r = tpm2_seal(device,