Re: [PATCH v2 7/8] iommu/arm-smmu-v3: Improve add_device() error handling

2019-11-11 Thread Jonathan Cameron
On Fri, 8 Nov 2019 16:25:07 +0100 Jean-Philippe Brucker wrote: > Let add_device() clean up after 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 >

[PATCH v2 7/8] iommu/arm-smmu-v3: Improve add_device() error handling

2019-11-08 Thread Jean-Philippe Brucker
Let add_device() clean up after 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