Handle perf_pmu_register() errors directly instead of breaking out of
the registration loop and checking the index separately. Reuse the loop
index i to unregister any previously registered PMUs in reverse order
and drop the extra index j.
Also log the failing PMU's name and error code.
Signed-off-by: Thorsten Blum <blum@kernel.org>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260904201313.271421-3-blum@kernel.org?part=1