summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/container.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/container.c')
-rw-r--r--drivers/acpi/container.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/acpi/container.c b/drivers/acpi/container.c
index 0688f83bc43..f8fb2281f34 100644
--- a/drivers/acpi/container.c
+++ b/drivers/acpi/container.c
@@ -166,11 +166,16 @@ static void container_notify_cb(acpi_handle handle, u32 type, void *context)
if (!ACPI_FAILURE(status) || device)
break;
- result = acpi_bus_add(handle, &device);
+ result = acpi_bus_add(handle);
if (result) {
acpi_handle_warn(handle, "Failed to add container\n");
break;
}
+ result = acpi_bus_get_device(handle, &device);
+ if (result) {
+ acpi_handle_warn(handle, "Missing device object\n");
+ break;
+ }
kobject_uevent(&device->dev.kobj, KOBJ_ONLINE);
ost_code = ACPI_OST_SC_SUCCESS;