Merge branch 'acpi-cleanup' into acpi-hotplug
[deliverable/linux.git] / drivers / xen / xen-acpi-memhotplug.c
index f2872a1bb0966d68583021b714a1e66d2a630cc6..f8d18626969a48819ae5810f1d424dc4eacf3f31 100644 (file)
@@ -168,7 +168,7 @@ static int acpi_memory_get_device(acpi_handle handle,
        acpi_scan_lock_acquire();
 
        acpi_bus_get_device(handle, &device);
-       if (device)
+       if (acpi_device_enumerated(device))
                goto end;
 
        /*
@@ -181,8 +181,9 @@ static int acpi_memory_get_device(acpi_handle handle,
                result = -EINVAL;
                goto out;
        }
-       result = acpi_bus_get_device(handle, &device);
-       if (result) {
+       device = NULL;
+       acpi_bus_get_device(handle, &device);
+       if (!acpi_device_enumerated(device)) {
                pr_warn(PREFIX "Missing device object\n");
                result = -EINVAL;
                goto out;
This page took 0.035511 seconds and 5 git commands to generate.