提交 b1e2afca 编写于 作者: S Shawn Lin 提交者: Joerg Roedel

iommu/ipmmu-vmsa: Fix wrong error handle of ipmmu_add_device

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: NShawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: NJoerg Roedel <jroedel@suse.de>
上级 c6935931
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部