diff options
| author | Olof Johansson <olof@lixom.net> | 2015-08-13 06:18:45 -0400 |
|---|---|---|
| committer | Olof Johansson <olof@lixom.net> | 2015-08-13 06:18:45 -0400 |
| commit | 07616f013b933a129b9e3be7779b63c85e26c399 (patch) | |
| tree | 84dbc04c938ff8ffc439cc0b1b57ab272483e566 | |
| parent | e2e927c8238a84454d0f841a2adf14d4adb1e845 (diff) | |
| parent | 3e9f798784b30293012682021d5a0352f78658b8 (diff) | |
Merge tag 'samsung-mach-fixes-4.2' of https://github.com/krzk/linux into fixes
Two fixes for bugs in Exynos power domain error exit path:
1. kfree() of read-only memory (name of power domain returned
by kstrdup_const()),
2. Doubled of_node_put() leading to invalid ref count for OF node.
* tag 'samsung-mach-fixes-4.2' of https://github.com/krzk/linux:
ARM: EXYNOS: fix double of_node_put() on error path
ARM: EXYNOS: Fix potentian kfree() of ro memory
Signed-off-by: Olof Johansson <olof@lixom.net>
| -rw-r--r-- | arch/arm/mach-exynos/pm_domains.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/arm/mach-exynos/pm_domains.c b/arch/arm/mach-exynos/pm_domains.c index 6001f1c9d136..4a87e86dec45 100644 --- a/arch/arm/mach-exynos/pm_domains.c +++ b/arch/arm/mach-exynos/pm_domains.c | |||
| @@ -146,9 +146,8 @@ static __init int exynos4_pm_init_power_domain(void) | |||
| 146 | pd->base = of_iomap(np, 0); | 146 | pd->base = of_iomap(np, 0); |
| 147 | if (!pd->base) { | 147 | if (!pd->base) { |
| 148 | pr_warn("%s: failed to map memory\n", __func__); | 148 | pr_warn("%s: failed to map memory\n", __func__); |
| 149 | kfree(pd->pd.name); | 149 | kfree_const(pd->pd.name); |
| 150 | kfree(pd); | 150 | kfree(pd); |
| 151 | of_node_put(np); | ||
| 152 | continue; | 151 | continue; |
| 153 | } | 152 | } |
| 154 | 153 | ||
