diff options
-rw-r--r-- | drivers/acpi/scan.c | 5 | ||||
-rw-r--r-- | drivers/acpi/video.c | 3 |
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 44225cb15f3a..b14ac46948c9 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c | |||
@@ -1017,11 +1017,8 @@ acpi_bus_driver_init(struct acpi_device *device, struct acpi_driver *driver) | |||
1017 | return -ENOSYS; | 1017 | return -ENOSYS; |
1018 | 1018 | ||
1019 | result = driver->ops.add(device); | 1019 | result = driver->ops.add(device); |
1020 | if (result) { | 1020 | if (result) |
1021 | device->driver = NULL; | ||
1022 | device->driver_data = NULL; | ||
1023 | return result; | 1021 | return result; |
1024 | } | ||
1025 | 1022 | ||
1026 | device->driver = driver; | 1023 | device->driver = driver; |
1027 | 1024 | ||
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 5d7075d25700..440eadf2d32c 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c | |||
@@ -1722,6 +1722,9 @@ static int acpi_video_bus_add(struct acpi_device *device) | |||
1722 | int error; | 1722 | int error; |
1723 | acpi_status status; | 1723 | acpi_status status; |
1724 | 1724 | ||
1725 | if (device->handler) | ||
1726 | return -EINVAL; | ||
1727 | |||
1725 | status = acpi_walk_namespace(ACPI_TYPE_DEVICE, | 1728 | status = acpi_walk_namespace(ACPI_TYPE_DEVICE, |
1726 | device->parent->handle, 1, | 1729 | device->parent->handle, 1, |
1727 | acpi_video_bus_match, NULL, | 1730 | acpi_video_bus_match, NULL, |