From nobody Tue Aug 16 09:11:31 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4M6QPc0WLtz4YVSZ; Tue, 16 Aug 2022 09:11:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4M6QPc046Tz3s6L; Tue, 16 Aug 2022 09:11:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660641092; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xcQt1Xt14QtQDRuyl9/YxE3w0F3cOsMmj7lNUGluABE=; b=JgrufccxUyqSJH/B+eL5LEOmZPN5mVWH4LUuNw4AJczykuZHo2miwNHJGLFy6dAAzoBeoT ih0l/ma9Cl56w94/l1K7ZirFQhZi5MmHnPtVttDwgBYL7IZ9NJyHyaId3SFjawQ2URtw15 xs/jTuQPOOHb/pQqub48dplYeImmdPCuhjDnNQPBOQ6hFwZZBCUg+EJwod9iEbdbC2WmKx w+ROCa6jQ1DCdTAYx5WGcJicrnO3BUL3rLAjGo7ufzLof1rkWLuwJ4R7bZuzF4XB3OlzpP iOJilfGRkDwC/bDw6SQHZqCRL2umTjhSWpiASNT/jpshXkIlx42fSdjQUfFojA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4M6QPb6FDMz13h9; Tue, 16 Aug 2022 09:11:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 27G9BVPX051446; Tue, 16 Aug 2022 09:11:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27G9BV78051445; Tue, 16 Aug 2022 09:11:31 GMT (envelope-from git) Date: Tue, 16 Aug 2022 09:11:31 GMT Message-Id: <202208160911.27G9BV78051445@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Kornel=20Dul=C4=99ba?= Subject: git: 31ee3a33aa61 - main - TPM: do not set device description if probe fails List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kd X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 31ee3a33aa612294db302828d4d1f6f0c83bef4c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660641092; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xcQt1Xt14QtQDRuyl9/YxE3w0F3cOsMmj7lNUGluABE=; b=loZxxin6V3Ev9aJRUWpWhh5BrFXruo5ACu1IqPQSRoy12G7+G4NHlNicxb9nvf0J4o5NID OKPF7ZG8guGte4uW6qG8cRpYwcdCmvjZpLlgNZ22gaFXVk2/0OLdZDcWE2QbRZ6/gnx80u ayaDvEXVpphmCcn5Fxjemy7NsbBcPupJ4qJWFcRWSkPWwG6vxaZXoZGQYpYZHfdVpQbWis lbS0HvO8yaSefQY/Ccfs7pliO5kDbt5FFAQJ8r2QjMGRH0zxjZAdhGdEbLj60j+MWNlD2h ZIYLQJdA+JN2wZobE7rroU14pFpcGNOuA5sMKnXlJWtj5JRsnePVUE7u4iAGww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660641092; a=rsa-sha256; cv=none; b=LKGQtP3P3fflMbh614AUrxfTxVBsIQ44ZGpvzoSjE8y6PlxG+FMsZvTFAYPDmjw6l+BU5U jiht4Q1KMBPDXI4qO/r7rfmWlhiKjTmEjsJD3cpWmZyoxdYeRblPKMgrqZgRcdMOkr6h6Q mq0LZKF2lGMcZxlMDTiR2bFsesZPp3ckJakzQx3nIo1KvqjjkqH6g7V337VITKO8/Excsn ibzh9OOmyW4yPgE3P9hv+ZTIyEdWtXo6WVuH1ieKZZad23azwoEItyg9OsJam/XozTZGKI eSdrB7ah9hk6fz4mPuUqYbnMU8rt6hzAjAiDz9aUOJZPuvBss8FsYi4sCjoLAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kd: URL: https://cgit.FreeBSD.org/src/commit/?id=31ee3a33aa612294db302828d4d1f6f0c83bef4c commit 31ee3a33aa612294db302828d4d1f6f0c83bef4c Author: Konrad Sewiłło-Jopek AuthorDate: 2022-08-16 07:27:36 +0000 Commit: Kornel Dulęba CommitDate: 2022-08-16 09:07:12 +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 --- 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 5b9619ee9b24..e18201c58a75 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);