diff options
Diffstat (limited to 'drivers/acpi/dock.c')
-rw-r--r-- | drivers/acpi/dock.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index 9ab9e783a894..8da6be99ba42 100644 --- a/drivers/acpi/dock.c +++ b/drivers/acpi/dock.c @@ -321,14 +321,11 @@ static int dock_present(struct dock_station *ds) */ static void dock_create_acpi_device(acpi_handle handle) { - struct acpi_device *device; + struct acpi_device *device = NULL; int ret; - if (acpi_bus_get_device(handle, &device)) { - /* - * no device created for this object, - * so we should create one. - */ + acpi_bus_get_device(handle, &device); + if (!acpi_device_enumerated(device)) { ret = acpi_bus_scan(handle); if (ret) pr_debug("error adding bus, %x\n", -ret); |