projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
06687a0
)
iommu/amd: Call memunmap in error path
author
Vasant Hegde
<vasant.hegde@amd.com>
Tue, 1 Mar 2022 08:56:23 +0000
(14:26 +0530)
committer
Joerg Roedel
<jroedel@suse.de>
Tue, 8 Mar 2022 11:18:49 +0000
(12:18 +0100)
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>
drivers/iommu/amd/init.c
patch
|
blob
|
history
diff --git
a/drivers/iommu/amd/init.c
b/drivers/iommu/amd/init.c
index 6b5af568f3d5adbb380b06c0dd54fade1623ee6a..f7e7d208063c23518e5e6b2c9a44d69dc5a69a09 100644
(file)
--- 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;
}