aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-11-13 18:54:00 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-11-18 19:02:22 -0500
commit5beaee4f195d0297473da9a45459050b561e10cf (patch)
tree2d72e0f132bdae893097d60a8018c6678f79cd2a /drivers/acpi
parent7b98118aaa5d75644c48f41fc5d0cc181e478383 (diff)
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 <rafael.j.wysocki@intel.com> Acked-by: Toshi Kani <toshi.kani@hp.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/scan.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 276cde70a514..4698060ba3f0 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)
411 break; 411 break;
412 case ACPI_NOTIFY_EJECT_REQUEST: 412 case ACPI_NOTIFY_EJECT_REQUEST:
413 acpi_handle_debug(handle, "ACPI_NOTIFY_EJECT_REQUEST event\n"); 413 acpi_handle_debug(handle, "ACPI_NOTIFY_EJECT_REQUEST event\n");
414 status = acpi_bus_get_device(handle, &adev); 414 if (acpi_bus_get_device(handle, &adev))
415 if (ACPI_FAILURE(status))
416 goto err_out; 415 goto err_out;
417 416
418 get_device(&adev->dev); 417 get_device(&adev->dev);