]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.11.9/arm-davinci-pm-do-not-free-useful-resources-in-normal-path-in-davinci_pm_init.patch
4.14-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.11.9 / arm-davinci-pm-do-not-free-useful-resources-in-normal-path-in-davinci_pm_init.patch
1 From 95d7c1f18bf8ac03b0fc48eac1f1b11f867765b8 Mon Sep 17 00:00:00 2001
2 From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
3 Date: Sat, 13 May 2017 13:40:20 +0200
4 Subject: ARM: davinci: PM: Do not free useful resources in normal path in 'davinci_pm_init'
5
6 From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
7
8 commit 95d7c1f18bf8ac03b0fc48eac1f1b11f867765b8 upstream.
9
10 It is wrong to iounmap resources in the normal path of davinci_pm_init()
11
12 The 3 ioremap'ed fields of 'pm_config' can be accessed later on in other
13 functions, so we should return 'success' instead of unrolling everything.
14
15 Fixes: aa9aa1ec2df6 ("ARM: davinci: PM: rework init, remove platform device")
16 Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
17 [nsekhar@ti.com: commit message and minor style fixes]
18 Signed-off-by: Sekhar Nori <nsekhar@ti.com>
19 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20
21 ---
22 arch/arm/mach-davinci/pm.c | 2 ++
23 1 file changed, 2 insertions(+)
24
25 --- a/arch/arm/mach-davinci/pm.c
26 +++ b/arch/arm/mach-davinci/pm.c
27 @@ -163,6 +163,8 @@ int __init davinci_pm_init(void)
28
29 suspend_set_ops(&davinci_pm_ops);
30
31 + return 0;
32 +
33 no_sram_mem:
34 iounmap(pm_config.ddrpsc_reg_base);
35 no_ddrpsc_mem: