diff mbox

[5/6] ACPI/OSL: Cleanup branch logics.

Message ID 8755bcd69676dd1ac4734db27b89fe0d13732864.1414029477.git.lv.zheng@intel.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Lv Zheng Oct. 23, 2014, 2:12 a.m. UTC
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@intel.com>
Tested-by: Fei Yang <fei.yang@intel.com>
---
 drivers/acpi/mem.c |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
diff mbox

Patch

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);