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

Commit 28d63403 authored by Chris Wilson's avatar Chris Wilson Committed by Rafael J. Wysocki
Browse files

ACPI / video: Propagate the error code for acpi_video_register



Report the actual error code from acpi_bus_register_driver(), it may
help future debugging (typically ENODEV as previously reported, but the
unusual cases are where it may help most).

Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Acked-by: default avatarAaron Lu <aaron.lu@intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 6e17cb12
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -2110,7 +2110,8 @@ static int __init intel_opregion_present(void)

int acpi_video_register(void)
{
	int result = 0;
	int ret;

	if (register_count) {
		/*
		 * if the function of acpi_video_register is already called,
@@ -2122,9 +2123,9 @@ int acpi_video_register(void)
	mutex_init(&video_list_lock);
	INIT_LIST_HEAD(&video_bus_head);

	result = acpi_bus_register_driver(&acpi_video_bus);
	if (result < 0)
		return -ENODEV;
	ret = acpi_bus_register_driver(&acpi_video_bus);
	if (ret)
		return ret;

	/*
	 * When the acpi_video_bus is loaded successfully, increase