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

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
...@@ -2110,7 +2110,8 @@ static int __init intel_opregion_present(void) ...@@ -2110,7 +2110,8 @@ static int __init intel_opregion_present(void)
int acpi_video_register(void) int acpi_video_register(void)
{ {
int result = 0; int ret;
if (register_count) { if (register_count) {
/* /*
* if the function of acpi_video_register is already called, * if the function of acpi_video_register is already called,
...@@ -2122,9 +2123,9 @@ int acpi_video_register(void) ...@@ -2122,9 +2123,9 @@ int acpi_video_register(void)
mutex_init(&video_list_lock); mutex_init(&video_list_lock);
INIT_LIST_HEAD(&video_bus_head); INIT_LIST_HEAD(&video_bus_head);
result = acpi_bus_register_driver(&acpi_video_bus); ret = acpi_bus_register_driver(&acpi_video_bus);
if (result < 0) if (ret)
return -ENODEV; return ret;
/* /*
* When the acpi_video_bus is loaded successfully, increase * When the acpi_video_bus is loaded successfully, increase
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment