ACPI / scan: Make it clear that acpi_bus_trim() cannot fail

Since acpi_bus_trim() cannot fail, change its definition to a void
function, so that its callers don't check the return value in vain
and update the callers.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Yinghai Lu <yinghai@kernel.org>
Acked-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Acked-by: Toshi Kani <toshi.kani@hp.com>
This commit is contained in:
Rafael J. Wysocki
2013-01-26 00:27:44 +01:00
parent b8bd759acd
commit bfee26dba0
4 changed files with 9 additions and 23 deletions

View File

@@ -336,13 +336,9 @@ static struct acpi_device * dock_create_acpi_device(acpi_handle handle)
static void dock_remove_acpi_device(acpi_handle handle)
{
struct acpi_device *device;
int ret;
if (!acpi_bus_get_device(handle, &device)) {
ret = acpi_bus_trim(device);
if (ret)
pr_debug("error removing bus, %x\n", -ret);
}
if (!acpi_bus_get_device(handle, &device))
acpi_bus_trim(device);
}
/**