Patch "soc: ti: pm33xx: Fix refcount leak in am33xx_pm_probe" 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 refcount leak in am33xx_pm_probe

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-refcount-leak-in-am33xx_pm_probe.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 1735b26770a4841636b8f3474f7ae115c10b8761
Author: Miaoqian Lin <linmq006@xxxxxxxxx>
Date:   Fri Jan 6 09:40:22 2023 +0400

    soc: ti: pm33xx: Fix refcount leak in am33xx_pm_probe
    
    [ Upstream commit 8f3c307b580a4a6425896007325bddefc36e8d91 ]
    
    wkup_m3_ipc_get() takes refcount, which should be freed by
    wkup_m3_ipc_put(). Add missing refcount release in the error paths.
    
    Fixes: 5a99ae0092fe ("soc: ti: pm33xx: AM437X: Add rtc_only with ddr in self-refresh support")
    Signed-off-by: Miaoqian Lin <linmq006@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20230106054022.947529-1-linmq006@xxxxxxxxx
    Signed-off-by: Nishanth Menon <nm@xxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/soc/ti/pm33xx.c b/drivers/soc/ti/pm33xx.c
index 332588de22f3f..44ec0048911cd 100644
--- a/drivers/soc/ti/pm33xx.c
+++ b/drivers/soc/ti/pm33xx.c
@@ -529,7 +529,7 @@ static int am33xx_pm_probe(struct platform_device *pdev)
 
 	ret = am33xx_pm_alloc_sram();
 	if (ret)
-		return ret;
+		goto err_wkup_m3_ipc_put;
 
 	ret = am33xx_pm_rtc_setup();
 	if (ret)
@@ -576,13 +576,14 @@ static int am33xx_pm_probe(struct platform_device *pdev)
 	pm_runtime_put_sync(dev);
 err_pm_runtime_disable:
 	pm_runtime_disable(dev);
-	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;
+err_wkup_m3_ipc_put:
+	wkup_m3_ipc_put(m3_ipc);
 	return ret;
 }
 



[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