ARM: davinci: PM: Free resources in error handling path in 'davinci_pm_init'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 13 May 2017 11:40:05 +0000 (13:40 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Jul 2017 12:41:41 +0000 (14:41 +0200)
commitb0ed471883749029e49c9a6f02b7568d7f9819d5
tree30640f3e347c5e815a5a727e7f6336a91ea27458
parent0afbd9fd39caff83e178dbaaa2581929d449cb85
ARM: davinci: PM: Free resources in error handling path in 'davinci_pm_init'

commit f3f6cc814f9cb61cfb738af2b126a8bf19e5ab4c upstream.

If 'sram_alloc' fails, we need to free already allocated resources.

Fixes: aa9aa1ec2df6 ("ARM: davinci: PM: rework init, remove platform device")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm/mach-davinci/pm.c