Patch "mmc: cavium-octeon: Add of_node_put() when breaking out of loop" has been added to the 5.4-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

    mmc: cavium-octeon: Add of_node_put() when breaking out of loop

to the 5.4-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:
     mmc-cavium-octeon-add-of_node_put-when-breaking-out-.patch
and it can be found in the queue-5.4 subdirectory.

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



commit 239b89b0625423476be44061952b030a87bc0b41
Author: Liang He <windhl@xxxxxxx>
Date:   Tue Jul 19 17:52:15 2022 +0800

    mmc: cavium-octeon: Add of_node_put() when breaking out of loop
    
    [ Upstream commit 19bbb49acf8d7a03cb83e05624363741a4c3ec6f ]
    
    In octeon_mmc_probe(), we should call of_node_put() when breaking
    out of for_each_child_of_node() which has increased and decreased
    the refcount during each iteration.
    
    Fixes: 01d95843335c ("mmc: cavium: Add MMC support for Octeon SOCs.")
    Signed-off-by: Liang He <windhl@xxxxxxx>
    Acked-by: Robert Richter <rric@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20220719095216.1241601-1-windhl@xxxxxxx
    Signed-off-by: Ulf Hansson <ulf.hansson@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/mmc/host/cavium-octeon.c b/drivers/mmc/host/cavium-octeon.c
index 22aded1065ae..2245452a44c8 100644
--- a/drivers/mmc/host/cavium-octeon.c
+++ b/drivers/mmc/host/cavium-octeon.c
@@ -288,6 +288,7 @@ static int octeon_mmc_probe(struct platform_device *pdev)
 		if (ret) {
 			dev_err(&pdev->dev, "Error populating slots\n");
 			octeon_mmc_set_shared_power(host, 0);
+			of_node_put(cn);
 			goto error;
 		}
 		i++;



[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