Skip to content

Commit

Permalink
ACPI / hotplug: Fix acpi_bus_get_device() return value check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rafael J. Wysocki committed Nov 19, 2013
1 parent 7b98118 commit 5beaee4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/acpi/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5beaee4

Please sign in to comment.