Re: [PATCH] perf/x86/intel/uncore: Fix iounmap() leak on global_init failure

From: Markus Elfring

Date: Tue Jan 13 2026 - 11:21:53 EST


> If domain->global_init() fails in __parse_discovery_table(), the
> mapped MMIO region is not released before returning, resulting in
> an iounmap() leak.

How do you think about to avoid a bit of duplicate source code here?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?h=v6.19-rc5#n526

See also once more:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.19-rc5#n94

Regards,
Markus