mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 05:55:44 +02:00
soc: ti: pm33xx: Fix some resource leak in the error handling paths of the probe function
[ Upstream commit17ad466259] 'am33xx_pm_rtc_setup()' allocates some resources that must be freed on the error. Commit2152fbbd47("soc: ti: pm33xx: Simplify RTC usage to prepare to drop platform data") has introduced the use of these resources but has only updated the remove function. Fix the error handling path of the probe function now. Fixes:2152fbbd47("soc: ti: pm33xx: Simplify RTC usage to prepare to drop platform data") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
6e46b23a9f
commit
3681476ad6
|
|
@ -536,7 +536,7 @@ static int am33xx_pm_probe(struct platform_device *pdev)
|
|||
|
||||
ret = am33xx_push_sram_idle();
|
||||
if (ret)
|
||||
goto err_free_sram;
|
||||
goto err_unsetup_rtc;
|
||||
|
||||
am33xx_pm_set_ipc_ops();
|
||||
|
||||
|
|
@ -566,6 +566,9 @@ static int am33xx_pm_probe(struct platform_device *pdev)
|
|||
|
||||
err_put_wkup_m3_ipc:
|
||||
wkup_m3_ipc_put(m3_ipc);
|
||||
err_unsetup_rtc:
|
||||
iounmap(rtc_base_virt);
|
||||
clk_put(rtc_fck);
|
||||
err_free_sram:
|
||||
am33xx_pm_free_sram();
|
||||
pm33xx_dev = NULL;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user