提交 058236ee 编写于 作者: Y Yang Yingliang 提交者: Will Deacon

iommu: return error code when it can't get group

Although iommu_group_get() in iommu_probe_device() will always succeed
thanks to __iommu_probe_device() creating the group if it's not present,
it's still worth initialising 'ret' to -ENODEV in case this path is
reachable in the future.

For now, this patch results in no functional change.
Reported-by: NHulk Robot <hulkci@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20201126133825.3643852-1-yangyingliang@huawei.comSigned-off-by: NWill Deacon <will@kernel.org>
上级 6243f572
......@@ -253,8 +253,10 @@ int iommu_probe_device(struct device *dev)
goto err_out;
group = iommu_group_get(dev);
if (!group)
if (!group) {
ret = -ENODEV;
goto err_release;
}
/*
* Try to allocate a default domain - needs support from the
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册