projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c693593
)
iommu/ipmmu-vmsa: Fix wrong error handle of ipmmu_add_device
author
Shawn Lin
<shawn.lin@rock-chips.com>
Wed, 24 Aug 2016 02:23:51 +0000
(10:23 +0800)
committer
Joerg Roedel
<jroedel@suse.de>
Mon, 5 Sep 2016 10:53:58 +0000
(12:53 +0200)
Let's fix the error handle of ipmmu_add_device
when failing to find utlbs, otherwise we take a
risk of pontential memleak.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/ipmmu-vmsa.c
patch
|
blob
|
history
diff --git
a/drivers/iommu/ipmmu-vmsa.c
b/drivers/iommu/ipmmu-vmsa.c
index
2fdbac6
..
ace331d
100644
(file)
--- a/
drivers/iommu/ipmmu-vmsa.c
+++ b/
drivers/iommu/ipmmu-vmsa.c
@@
-636,7
+636,7
@@
static int ipmmu_add_device(struct device *dev)
spin_unlock(&ipmmu_devices_lock);
if (ret < 0)
-
return -ENODEV
;
+
goto error
;
for (i = 0; i < num_utlbs; ++i) {
if (utlbs[i] >= mmu->num_utlbs) {