1
0
Fork 0

ARM: davinci: PM: Do not free useful resources in normal path in 'davinci_pm_init'

It is wrong to iounmap resources in the normal path of davinci_pm_init()

The 3 ioremap'ed fields of 'pm_config' can be accessed later on in other
functions, so we should return 'success' instead of unrolling everything.

Fixes: aa9aa1ec2d ("ARM: davinci: PM: rework init, remove platform device")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
[nsekhar@ti.com: commit message and minor style fixes]
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
zero-colors
Christophe JAILLET 2017-05-13 13:40:20 +02:00 committed by Sekhar Nori
parent f3f6cc814f
commit 95d7c1f18b
1 changed files with 2 additions and 0 deletions

View File

@ -162,6 +162,8 @@ int __init davinci_pm_init(void)
suspend_set_ops(&davinci_pm_ops);
return 0;
no_sram_mem:
iounmap(pm_config.ddrpsc_reg_base);
no_ddrpsc_mem: