Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5beaee4f authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

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: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: default avatarToshi Kani <toshi.kani@hp.com>
parent 7b98118a
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -411,8 +411,7 @@ static void acpi_hotplug_notify_cb(acpi_handle handle, u32 type, void *data)
		break;
		break;
	case ACPI_NOTIFY_EJECT_REQUEST:
	case ACPI_NOTIFY_EJECT_REQUEST:
		acpi_handle_debug(handle, "ACPI_NOTIFY_EJECT_REQUEST event\n");
		acpi_handle_debug(handle, "ACPI_NOTIFY_EJECT_REQUEST event\n");
		status = acpi_bus_get_device(handle, &adev);
		if (acpi_bus_get_device(handle, &adev))
		if (ACPI_FAILURE(status))
			goto err_out;
			goto err_out;


		get_device(&adev->dev);
		get_device(&adev->dev);