acpi_get_object can be called with a null path

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28249 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval
2008-10-20 19:03:19 +00:00
parent 59dbd26f5f
commit 7cf856daef
@@ -29,9 +29,12 @@ acpi_get_object_type(acpi_device device)
static status_t static status_t
acpi_get_object(acpi_device device, const char *path, acpi_object_type **return_value) acpi_get_object(acpi_device device, const char *path, acpi_object_type **return_value)
{ {
char objname[255]; if (path) {
snprintf(objname, sizeof(objname), "%s.%s", device->path, path); char objname[255];
return get_object(objname, return_value); snprintf(objname, sizeof(objname), "%s.%s", device->path, path);
return get_object(objname, return_value);
}
return get_object(device->path, return_value);
} }