iommu/of: Refactor of_iommu_configure() for error handling