This function can fail. Propagate any errors back to the
initialization state machine.
Signed-off-by: Joerg Roedel <jroedel@suse.de>
.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)
for_each_iommu(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;
}
extern int amd_iommu_init_devices(void);
extern void amd_iommu_uninit_devices(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 */
extern int amd_iommu_prepare(void);