Patch "soc: ti: pm33xx: Fix some resource leak in the error handling paths of the probe function" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    soc: ti: pm33xx: Fix some resource leak in the error handling paths of the probe function

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     soc-ti-pm33xx-fix-some-resource-leak-in-the-error-ha.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 5bf965dbc36b729a3e6c323f3a80d53c30f6218c
Author: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
Date:   Sun Jan 24 20:51:36 2021 -0800

    soc: ti: pm33xx: Fix some resource leak in the error handling paths of the probe function
    
    [ Upstream commit 17ad4662595ea0c4fd7496b664523ef632e63349 ]
    
    'am33xx_pm_rtc_setup()' allocates some resources that must be freed on the
    error. Commit 2152fbbd47c0 ("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: 2152fbbd47c0 ("soc: ti: pm33xx: Simplify RTC usage to prepare to drop platform data")
    Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
    Signed-off-by: Santosh Shilimkar <santosh.shilimkar@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/soc/ti/pm33xx.c b/drivers/soc/ti/pm33xx.c
index d2f5e7001a93c..dc21aa855a458 100644
--- a/drivers/soc/ti/pm33xx.c
+++ b/drivers/soc/ti/pm33xx.c
@@ -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;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux