提交 5c2d0218 编写于 作者: A Arvind Yadav 提交者: Will Deacon

iommu: arm-smmu: Handle return of iommu_device_register.

iommu_device_register returns an error code and, although it currently
never fails, we should check its return value anyway.
Signed-off-by: NArvind Yadav <arvind.yadav.cs@gmail.com>
[will: adjusted to follow arm-smmu.c]
Signed-off-by: NWill Deacon <will.deacon@arm.com>
上级 ebdd13c9
...@@ -2744,6 +2744,10 @@ static int arm_smmu_device_probe(struct platform_device *pdev) ...@@ -2744,6 +2744,10 @@ static int arm_smmu_device_probe(struct platform_device *pdev)
iommu_device_set_fwnode(&smmu->iommu, dev->fwnode); iommu_device_set_fwnode(&smmu->iommu, dev->fwnode);
ret = iommu_device_register(&smmu->iommu); ret = iommu_device_register(&smmu->iommu);
if (ret) {
dev_err(dev, "Failed to register iommu\n");
return ret;
}
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
if (pci_bus_type.iommu_ops != &arm_smmu_ops) { if (pci_bus_type.iommu_ops != &arm_smmu_ops) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册