From: Rafael J. Wysocki Date: Wed, 13 Nov 2013 23:54:00 +0000 (+0100) Subject: ACPI / hotplug: Fix acpi_bus_get_device() return value check X-Git-Tag: v3.13-rc2~19^2~3^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5beaee4f195d0297473da9a45459050b561e10cf;p=profile%2Fivi%2Fkernel-x86-ivi.git ACPI / hotplug: Fix acpi_bus_get_device() return value check Since acpi_bus_get_device() returns a plain int and not acpi_status, ACPI_FAILURE() should not be used for checking its return value. Fix that. Signed-off-by: Rafael J. Wysocki Acked-by: Toshi Kani --- diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 276cde7..4698060 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -411,8 +411,7 @@ static void acpi_hotplug_notify_cb(acpi_handle handle, u32 type, void *data) break; case ACPI_NOTIFY_EJECT_REQUEST: acpi_handle_debug(handle, "ACPI_NOTIFY_EJECT_REQUEST event\n"); - status = acpi_bus_get_device(handle, &adev); - if (ACPI_FAILURE(status)) + if (acpi_bus_get_device(handle, &adev)) goto err_out; get_device(&adev->dev);