Message ID | 8755bcd69676dd1ac4734db27b89fe0d13732864.1414029477.git.lv.zheng@intel.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
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);