From bfee26dba0f373ebe4e6f0b293d078b02f9f7f69 Mon Sep 17 00:00:00 2001 From: "Rafael J. Wysocki" Date: Sat, 26 Jan 2013 00:27:44 +0100 Subject: 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 Acked-by: Yinghai Lu Acked-by: Yasuaki Ishimatsu Acked-by: Toshi Kani --- drivers/acpi/dock.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'drivers/acpi/dock.c') diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index 420d24fc9388..78648f811049 100644 --- a/drivers/acpi/dock.c +++ b/drivers/acpi/dock.c @@ -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); } /** -- cgit