forked from Minki/linux
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>
This commit is contained in:
parent
6e17cb1288
commit
28d634038d
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user