From d095f394180bedd6c35beef95441c220a28827f5 Mon Sep 17 00:00:00 2001 From: Carter Li Date: Thu, 26 Sep 2024 19:23:21 +0800 Subject: [PATCH] TPM (FreeBSD): fix silly bug... --- src/detection/tpm/tpm_bsd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/detection/tpm/tpm_bsd.c b/src/detection/tpm/tpm_bsd.c index 53dbba539..7ee11cbea 100644 --- a/src/detection/tpm/tpm_bsd.c +++ b/src/detection/tpm/tpm_bsd.c @@ -6,7 +6,7 @@ const char* ffDetectTPM(FFTPMResult* result) { if (ffSysctlGetString("dev.tpmcrb.0.%desc", &result->description) != NULL) { - if (ffKernelModLoaded("tpm")) return "`tpm` kernel module is not loaded"; + if (!ffKernelModLoaded("tpm")) return "`tpm` kernel module is not loaded"; return "TPM device is not found"; } @@ -17,5 +17,5 @@ const char* ffDetectTPM(FFTPMResult* result) else ffStrbufSetStatic(&result->version, "unknown"); - return "Not supported on this platform"; + return NULL; }