iommu/ipmmu-vmsa: Register in a sensible order
authorRobin Murphy <robin.murphy@arm.com>
Thu, 20 Mar 2025 14:41:27 +0000 (14:41 +0000)
committerJoerg Roedel <jroedel@suse.de>
Fri, 11 Apr 2025 07:24:10 +0000 (09:24 +0200)
commitd9d3cede416719c2d41cd4da1955b12a85856e2f
treea761f6866e03772b532d7b15c558b53e05c955fb
parent280e5a30100578106a4305ce0118e0aa9b866f12
iommu/ipmmu-vmsa: Register in a sensible order

IPMMU registers almost-initialised instances, but misses assigning the
drvdata to make them fully functional, so initial calls back into
ipmmu_probe_device() are likely to fail unnecessarily. Reorder this to
work as it should, also pruning the long-out-of-date comment and adding
the missing sysfs cleanup on error for good measure.

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Fixes: bcb81ac6ae3c ("iommu: Get DT/ACPI parsing into the proper probe path")
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/53be6667544de65a15415b699e38a9a965692e45.1742481687.git.robin.murphy@arm.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/ipmmu-vmsa.c