[PATCH 5/6] ACPI/OSL: Cleanup branch logics.
From: Lv Zheng
Date: Wed Oct 22 2014 - 22:13:13 EST
This patch cleans up trivial branch logics in acpi_os_unmap_iomem() to
eliminate several lines. No functional changes.
Signed-off-by: Lv Zheng <lv.zheng@xxxxxxxxx>
Tested-by: Fei Yang <fei.yang@xxxxxxxxx>
---
drivers/acpi/mem.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/acpi/mem.c b/drivers/acpi/mem.c
index c472237..c7c35f7 100644
--- a/drivers/acpi/mem.c
+++ b/drivers/acpi/mem.c
@@ -194,12 +194,10 @@ void __ref acpi_os_unmap_iomem(void __iomem *virt, acpi_size size)
mutex_lock(&acpi_ioremap_lock);
map = acpi_map_lookup_virt(virt, size);
- if (!map) {
- mutex_unlock(&acpi_ioremap_lock);
+ if (map)
+ acpi_map_put(map);
+ else
WARN(true, PREFIX "%s: bad address %p\n", __func__, virt);
- return;
- }
- acpi_map_put(map);
mutex_unlock(&acpi_ioremap_lock);
acpi_map_cleanup(map);
--
1.7.10
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/