Patch "OPP: Fix missing cleanup on error in _opp_attach_genpd()" has been added to the 6.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

    OPP: Fix missing cleanup on error in _opp_attach_genpd()

to the 6.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:
     opp-fix-missing-cleanup-on-error-in-_opp_attach_genp.patch
and it can be found in the queue-6.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 cd801da3e1c65db0d709c1897253aeca4bd7a101
Author: Viresh Kumar <viresh.kumar@xxxxxxxxxx>
Date:   Tue May 28 10:58:37 2024 +0530

    OPP: Fix missing cleanup on error in _opp_attach_genpd()
    
    [ Upstream commit d86a2f0800683652004490c590b4b96a63e7fc04 ]
    
    A recent commit updated the code mistakenly to return directly on
    errors, without doing the required cleanups. Fix it.
    
    Fixes: 2a56c462fe5a ("OPP: Fix required_opp_tables for multiple genpds using same table")
    Reported-by: kernel test robot <lkp@xxxxxxxxx>
    Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
    Closes: https://lore.kernel.org/r/202405180016.4fbn86bm-lkp@xxxxxxxxx/
    Signed-off-by: Viresh Kumar <viresh.kumar@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/opp/core.c b/drivers/opp/core.c
index cb4611fe1b5b2..4e4d293bf5b10 100644
--- a/drivers/opp/core.c
+++ b/drivers/opp/core.c
@@ -2443,8 +2443,10 @@ static int _opp_attach_genpd(struct opp_table *opp_table, struct device *dev,
 		 * Cross check it again and fix if required.
 		 */
 		gdev = dev_to_genpd_dev(virt_dev);
-		if (IS_ERR(gdev))
-			return PTR_ERR(gdev);
+		if (IS_ERR(gdev)) {
+			ret = PTR_ERR(gdev);
+			goto err;
+		}
 
 		genpd_table = _find_opp_table(gdev);
 		if (!IS_ERR(genpd_table)) {




[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