mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-20 02:34:23 +08:00
ARM: exynos: Clear global variable on init error path
For most of Exynos SoCs, Power Management Unit (PMU) address space is mapped into global variable 'pmu_base_addr' very early when initializing PMU interrupt controller. A lot of other machine code depends on it so when doing iounmap() on this address, clear the global as well to avoid usage of invalid value (pointing to unmapped memory region). Properly mapped PMU address space is a requirement for all other machine code so this fix is purely theoretical. Boot will fail immediately in many other places after following this error path. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
This commit is contained in:
parent
e89549a596
commit
cd4806911c
@ -203,6 +203,7 @@ static int __init exynos_pmu_irq_init(struct device_node *node,
|
||||
NULL);
|
||||
if (!domain) {
|
||||
iounmap(pmu_base_addr);
|
||||
pmu_base_addr = NULL;
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user