mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
ACPI: acpi_bus_{scan,bus,add}: return -ENODEV if no device was found
Callers (acpi_memhotplug.c, dock.c and others) check for the return value of acpi_bus_add() and assume a valid device was returned in case zero was returned. Thus return -ENODEV if no device was found in acpi_bus_scan and propagate this through acpi_bus_add and acpi_bus_start. Also remove a confusing comment in acpiphp_glue.c, acpi_bus_scan will and cannot invoke if acpi_bus_add returns no valid device. Signed-off-by: Thomas Renninger <[email protected]> Acked-by: Bjorn Helgaas <[email protected]> Signed-off-by: Len Brown <[email protected]>
This commit is contained in:
parent
d2f6650a95
commit
7779688fc3
2 changed files with 19 additions and 11 deletions
|
|
@ -720,12 +720,6 @@ static int acpiphp_bus_add(struct acpiphp_func *func)
|
|||
-ret_val);
|
||||
goto acpiphp_bus_add_out;
|
||||
}
|
||||
/*
|
||||
* try to start anyway. We could have failed to add
|
||||
* simply because this bus had previously been added
|
||||
* on another add. Don't bother with the return value
|
||||
* we just keep going.
|
||||
*/
|
||||
ret_val = acpi_bus_start(device);
|
||||
|
||||
acpiphp_bus_add_out:
|
||||
|
|
|
|||
Loading…
Reference in a new issue