diff options
author | Vasant Hegde | 2022-03-01 14:26:23 +0530 |
---|---|---|
committer | Joerg Roedel | 2022-03-08 12:18:49 +0100 |
commit | 434d2defa93b59b8e845b49bd6882cefd009f516 (patch) | |
tree | 171540c9a8f0a0ca6b01f1a6562fcd92957b6201 /drivers/iommu | |
parent | 06687a03805e29dcf068a8e6436ed2a2bbd8b9e9 (diff) |
iommu/amd: Call memunmap in error path
Unmap old_devtb in error path.
Signed-off-by: Vasant Hegde <vasant.hegde@amd.com>
Link: https://lore.kernel.org/r/20220301085626.87680-3-vasant.hegde@amd.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu')
-rw-r--r-- | drivers/iommu/amd/init.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c index 6b5af568f3d5..f7e7d208063c 100644 --- a/drivers/iommu/amd/init.c +++ b/drivers/iommu/amd/init.c @@ -980,6 +980,7 @@ static bool copy_device_table(void) get_order(dev_table_size)); if (old_dev_tbl_cpy == NULL) { pr_err("Failed to allocate memory for copying old device table!\n"); + memunmap(old_devtb); return false; } @@ -1010,6 +1011,7 @@ static bool copy_device_table(void) if ((int_ctl != DTE_IRQ_REMAP_INTCTL) || (int_tab_len != DTE_INTTABLEN)) { pr_err("Wrong old irq remapping flag: %#x\n", devid); + memunmap(old_devtb); return false; } |