aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/intel
diff options
context:
space:
mode:
authorTakanori Watanabe <takawata@FreeBSD.org>2018-10-26 00:05:46 +0000
committerTakanori Watanabe <takawata@FreeBSD.org>2018-10-26 00:05:46 +0000
commit5efca36fbda65afe7726d685dcc43a707ef76447 (patch)
tree582c853f814a4acc5c72bf510ec4ba7b180e75c3 /sys/dev/intel
parentfef4815e9af171e64f6156bf7b97bb7424b8a22b (diff)
Notes
Diffstat (limited to 'sys/dev/intel')
-rw-r--r--sys/dev/intel/spi.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/sys/dev/intel/spi.c b/sys/dev/intel/spi.c
index e9b9bfc46fb0c..b11fa468c0567 100644
--- a/sys/dev/intel/spi.c
+++ b/sys/dev/intel/spi.c
@@ -423,13 +423,14 @@ static int
intelspi_probe(device_t dev)
{
static char *gpio_ids[] = { "80860F0E", NULL };
-
- if (acpi_disabled("spi") ||
- ACPI_ID_PROBE(device_get_parent(dev), dev, gpio_ids) == NULL)
- return (ENXIO);
-
- device_set_desc(dev, "Intel SPI Controller");
- return (0);
+ int rv;
+
+ if (acpi_disabled("spi") )
+ return (ENXIO);
+ rv = ACPI_ID_PROBE(device_get_parent(dev), dev, gpio_ids, NULL);
+ if (rv <= 0)
+ device_set_desc(dev, "Intel SPI Controller");
+ return (rv);
}
static int