iommu/arm-smmu-v3: Improve add_device error handling
hulk inclusion category: feature bugzilla: 14369 CVE: NA ------------------- As add_device becomes more likely to fail when adding new features, let it clean up behind itself. The iommu_bus_init function does call remove_device on error, but other sites (e.g. of_iommu) do not. Don't free level-2 stream tables because we'd have to track if we allocated each of them or if they are used by other endpoints. It's not worth the hassle since they are managed resources. Signed-off-by: NJean-Philippe Brucker <jean-philippe.brucker@arm.com> Signed-off-by: NFang Lijun <fanglijun3@huawei.com> Reviewed-by: NHanjun Guo <guohanjun@huawei.com> Reviewed-by: NZhen Lei <thunder.leizhen@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Showing
想要评论请 注册 或 登录