提交 3a18404c 编写于 作者: J Joerg Roedel

iommu/amd: Propagate errors from amd_iommu_init_api

This function can fail. Propagate any errors back to the
initialization state machine.
Signed-off-by: NJoerg Roedel <jroedel@suse.de>
上级 2870b0a4
...@@ -2840,9 +2840,9 @@ static struct dma_map_ops amd_iommu_dma_ops = { ...@@ -2840,9 +2840,9 @@ static struct dma_map_ops amd_iommu_dma_ops = {
.dma_supported = amd_iommu_dma_supported, .dma_supported = amd_iommu_dma_supported,
}; };
void __init amd_iommu_init_api(void) int __init amd_iommu_init_api(void)
{ {
bus_set_iommu(&pci_bus_type, &amd_iommu_ops); return bus_set_iommu(&pci_bus_type, &amd_iommu_ops);
} }
int __init amd_iommu_init_dma_ops(void) int __init amd_iommu_init_dma_ops(void)
......
...@@ -1391,9 +1391,10 @@ static int __init amd_iommu_init_pci(void) ...@@ -1391,9 +1391,10 @@ static int __init amd_iommu_init_pci(void)
for_each_iommu(iommu) for_each_iommu(iommu)
iommu_flush_all_caches(iommu); iommu_flush_all_caches(iommu);
amd_iommu_init_api(); ret = amd_iommu_init_api();
print_iommu_info(); if (!ret)
print_iommu_info();
return ret; return ret;
} }
......
...@@ -30,7 +30,7 @@ extern void amd_iommu_reset_cmd_buffer(struct amd_iommu *iommu); ...@@ -30,7 +30,7 @@ extern void amd_iommu_reset_cmd_buffer(struct amd_iommu *iommu);
extern int amd_iommu_init_devices(void); extern int amd_iommu_init_devices(void);
extern void amd_iommu_uninit_devices(void); extern void amd_iommu_uninit_devices(void);
extern void amd_iommu_init_notifier(void); extern void amd_iommu_init_notifier(void);
extern void amd_iommu_init_api(void); extern int amd_iommu_init_api(void);
/* Needed for interrupt remapping */ /* Needed for interrupt remapping */
extern int amd_iommu_prepare(void); extern int amd_iommu_prepare(void);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册