iommu/arm: Cleanup resources in case of probe error path

If device registration fails, remove sysfs attribute
and if setting bus callbacks fails, unregister the device
and cleanup the sysfs attribute.

Signed-off-by: Amey Narkhede <ameynarkhede03@gmail.com>
Link: https://lore.kernel.org/r/20210608164559.204023-1-ameynarkhede03@gmail.com
Signed-off-by: Will Deacon <will@kernel.org>
This commit is contained in:
Amey Narkhede 2021-06-08 22:15:59 +05:30 • committed by Will Deacon
commit 249c9dc6aa
3 changed files with 35 additions and 7 deletions