Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Sep 2022 07:21:25 GMT
From:      =?utf-8?Q?Kornel=20Dul=C4=99ba?= <kd@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 91af12081edc - stable/13 - TPM: do not set device description if probe fails
Message-ID:  <202209010721.2817LP7N071984@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kd:

URL: https://cgit.FreeBSD.org/src/commit/?id=91af12081edcb0ce6fccce3e5a037985fe0975a2

commit 91af12081edcb0ce6fccce3e5a037985fe0975a2
Author:     Konrad Sewiłło-Jopek <kjopek@gmail.com>
AuthorDate: 2022-08-16 07:27:36 +0000
Commit:     Kornel Dulęba <kd@FreeBSD.org>
CommitDate: 2022-09-01 07:14:40 +0000

    TPM: do not set device description if probe fails
    
    device_set_desc should be called only if driver probes successfully.
    
    Approved by:    mw(mentor)
    Reviewed by:    mw, kd
    MFC after:      2 weeks
    Differential Revision:  https://reviews.freebsd.org/D35998
    
    (cherry picked from commit 31ee3a33aa612294db302828d4d1f6f0c83bef4c)
---
 sys/dev/tpm/tpm_crb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/dev/tpm/tpm_crb.c b/sys/dev/tpm/tpm_crb.c
index 5345be261d16..c471fddf61f2 100644
--- a/sys/dev/tpm/tpm_crb.c
+++ b/sys/dev/tpm/tpm_crb.c
@@ -114,7 +114,7 @@ tpmcrb_acpi_probe(device_t dev)
 	status = AcpiGetTable(ACPI_SIG_TPM2, 1, (ACPI_TABLE_HEADER **) &tbl);
 	if(ACPI_FAILURE(status) ||
 	   tbl->StartMethod != TPM2_START_METHOD_CRB)
-		err = ENXIO;
+		return (ENXIO);
 
 	device_set_desc(dev, "Trusted Platform Module 2.0, CRB mode");
 	return (err);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202209010721.2817LP7N071984>