aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/iommu/amd_iommu_init.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c
index 75653daf1de1..526652a7385d 100644
--- a/drivers/iommu/amd_iommu_init.c
+++ b/drivers/iommu/amd_iommu_init.c
@@ -358,8 +358,6 @@ static void iommu_disable(struct amd_iommu *iommu)
358 */ 358 */
359static u8 * __init iommu_map_mmio_space(u64 address) 359static u8 * __init iommu_map_mmio_space(u64 address)
360{ 360{
361 u8 *ret;
362
363 if (!request_mem_region(address, MMIO_REGION_LENGTH, "amd_iommu")) { 361 if (!request_mem_region(address, MMIO_REGION_LENGTH, "amd_iommu")) {
364 pr_err("AMD-Vi: Can not reserve memory region %llx for mmio\n", 362 pr_err("AMD-Vi: Can not reserve memory region %llx for mmio\n",
365 address); 363 address);
@@ -367,13 +365,7 @@ static u8 * __init iommu_map_mmio_space(u64 address)
367 return NULL; 365 return NULL;
368 } 366 }
369 367
370 ret = ioremap_nocache(address, MMIO_REGION_LENGTH); 368 return ioremap_nocache(address, MMIO_REGION_LENGTH);
371 if (ret != NULL)
372 return ret;
373
374 release_mem_region(address, MMIO_REGION_LENGTH);
375
376 return NULL;
377} 369}
378 370
379static void __init iommu_unmap_mmio_space(struct amd_iommu *iommu) 371static void __init iommu_unmap_mmio_space(struct amd_iommu *iommu)