ACPI / hotplug: Check scan handlers in acpi_scan_hot_remove()
[platform/adaptation/renesas_rcar/renesas_kernel.git] / drivers / acpi / scan.c
index 57b053f..33afe78 100644 (file)
@@ -329,7 +329,8 @@ static int acpi_scan_hot_remove(struct acpi_device *device)
        unsigned long long sta;
        acpi_status status;
 
-       if (device->handler->hotplug.demand_offline && !acpi_force_hot_remove) {
+       if (device->handler && device->handler->hotplug.demand_offline
+           && !acpi_force_hot_remove) {
                if (!acpi_scan_is_offline(device, true))
                        return -EBUSY;
        } else {