1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-30 06:25:37 +03:00

cryptenroll: drop deadcode

Follow-up for b0fc23fae5.

After the commit, 'signature_path' is now always non-NULL, hence the
condition can be dropped.

Fixes CID#1504492.
This commit is contained in:
Yu Watanabe 2023-02-10 18:22:57 +09:00 committed by Luca Boccassi
parent c9853672a0
commit 645063d1bb

View File

@ -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,