}
static int log_debug_open_error(struct crypt_device *cd, int r) {
- if (r == -EAGAIN) {
- crypt_log_debug(cd, "TPM2 device not found.");
- return r;
- } else if (r == -ENXIO) {
- crypt_log_debug(cd, "No matching TPM2 token data found.");
- return r;
- }
+ if (r == -EAGAIN)
+ return crypt_log_debug_errno(cd, r, "TPM2 device not found.");
+ if (r == -ENXIO)
+ return crypt_log_debug_errno(cd, r, "No matching TPM2 token data found.");
return crypt_log_debug_errno(cd, r, TOKEN_NAME " open failed: %m.");
}