Patch "memory: atmel-ebi: add missing of_node_put for loop iteration" has been added to the 5.13-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

    memory: atmel-ebi: add missing of_node_put for loop iteration

to the 5.13-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:
     memory-atmel-ebi-add-missing-of_node_put-for-loop-it.patch
and it can be found in the queue-5.13 subdirectory.

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



commit 6ffcd2a308365033dbfc02100c1be4d9fc4b7400
Author: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxxxxx>
Date:   Fri Apr 23 12:18:15 2021 +0200

    memory: atmel-ebi: add missing of_node_put for loop iteration
    
    [ Upstream commit 907c5bbb514a4676160e79764522fff56ce3448e ]
    
    Early exits from for_each_available_child_of_node() should decrement the
    node reference counter.  Reported by Coccinelle:
    
      drivers/memory/atmel-ebi.c:593:1-33: WARNING:
        Function "for_each_available_child_of_node" should have of_node_put() before return around line 604.
    
    Fixes: 6a4ec4cd0888 ("memory: add Atmel EBI (External Bus Interface) driver")
    Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20210423101815.119341-2-krzysztof.kozlowski@xxxxxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/memory/atmel-ebi.c b/drivers/memory/atmel-ebi.c
index 14386d0b5f57..c267283b01fd 100644
--- a/drivers/memory/atmel-ebi.c
+++ b/drivers/memory/atmel-ebi.c
@@ -600,8 +600,10 @@ static int atmel_ebi_probe(struct platform_device *pdev)
 				child);
 
 			ret = atmel_ebi_dev_disable(ebi, child);
-			if (ret)
+			if (ret) {
+				of_node_put(child);
 				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