diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2015-03-01 13:41:38 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-03-04 17:10:36 +0300 |
commit | 28d634038d8fed8d25b92f21b728318a79c0be00 (patch) | |
tree | 894a1b28b2b1e84ab43a1e9a460ae7bae3b331b1 /drivers | |
parent | 6e17cb12881ba8d5e456b89f072dc6b70048af36 (diff) | |
download | linux-28d634038d8fed8d25b92f21b728318a79c0be00.tar.xz |
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: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Aaron Lu <aaron.lu@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/video.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 5f98ac69729a..26eb70c8f518 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c @@ -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 |