diff options
| author | Takanori Watanabe <takawata@FreeBSD.org> | 2018-10-26 00:05:46 +0000 |
|---|---|---|
| committer | Takanori Watanabe <takawata@FreeBSD.org> | 2018-10-26 00:05:46 +0000 |
| commit | 5efca36fbda65afe7726d685dcc43a707ef76447 (patch) | |
| tree | 582c853f814a4acc5c72bf510ec4ba7b180e75c3 /sys/dev/tpm | |
| parent | fef4815e9af171e64f6156bf7b97bb7424b8a22b (diff) | |
Notes
Diffstat (limited to 'sys/dev/tpm')
| -rw-r--r-- | sys/dev/tpm/tpm_acpi.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/dev/tpm/tpm_acpi.c b/sys/dev/tpm/tpm_acpi.c index b16dd234b3df..496d0e8173e3 100644 --- a/sys/dev/tpm/tpm_acpi.c +++ b/sys/dev/tpm/tpm_acpi.c @@ -52,12 +52,13 @@ char *tpm_ids[] = {"ATM1200", "BCM0102", "INTC0102", "SNO3504", "WEC1000", static int tpm_acpi_probe(device_t dev) { - if (ACPI_ID_PROBE(device_get_parent(dev), dev, tpm_ids) != NULL) { - device_set_desc(dev, "Trusted Platform Module"); - return BUS_PROBE_DEFAULT; - } + int rv; - return ENXIO; + rv = ACPI_ID_PROBE(device_get_parent(dev), dev, tpm_ids, NULL); + if (rv <= 0) + device_set_desc(dev, "Trusted Platform Module"); + + return (rv); } static device_method_t tpm_acpi_methods[] = { |
