iommu/arm-smmu: Tear down domain context if attach fails
Currently we're leaving domains half-initialized after a partially-successful attach. Fix this by destroying the domain in the error path. This should allow another second attach_dev() call to potentially succeed. This differs from the upstream implementation in that upstream seems to expect a call to domain_free() after a failed attach_dev(). Without this call flow, an error in alloc_io_pgtable_ops() will cause a bit from the context bank bitmask to be leaked. Additionally, do not ignore errors from request_irq(). Change-Id: I36c529ed4974c01fba96088b6f57a8e82b350252 Signed-off-by:Jeremy Gebben <jgebben@codeaurora.org> Signed-off-by:
Patrick Daly <pdaly@codeaurora.org>
Loading
Please register or sign in to comment