summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/acpi/device.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/acpi/device.c b/src/acpi/device.c
index b76357e675..92000a3d8b 100644
--- a/src/acpi/device.c
+++ b/src/acpi/device.c
@@ -76,8 +76,11 @@ const char *acpi_device_name(const struct device *dev)
return NULL;
/* Check for device specific handler */
- if (dev->ops && dev->ops->acpi_name)
- return dev->ops->acpi_name(dev);
+ if (dev->ops && dev->ops->acpi_name) {
+ name = dev->ops->acpi_name(dev);
+ if (name)
+ return name;
+ }
/* Walk up the tree to find if any parent can identify this device */
while (pdev->bus) {