Patch "ARM: exynos: add missing of_node_put for loop iteration" 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

    ARM: exynos: add missing of_node_put for loop iteration

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:
     arm-exynos-add-missing-of_node_put-for-loop-iteratio.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 74f98798ac982e47c51c5ca5f6aef07562b41e31
Author: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxxxxx>
Date:   Sun Apr 25 19:49:45 2021 +0200

    ARM: exynos: add missing of_node_put for loop iteration
    
    [ Upstream commit 48d551bf20858240f38a0276be3016ff379918ac ]
    
    Early exits from for_each_compatible_node() should decrement the
    node reference counter.  Reported by Coccinelle:
    
      arch/arm/mach-exynos/exynos.c:52:1-25: WARNING:
        Function "for_each_compatible_node" should have of_node_put() before break around line 58.
    
    Fixes: b3205dea8fbf ("ARM: EXYNOS: Map SYSRAM through generic DT bindings")
    Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxxxxx>
    Acked-by: Arnd Bergmann <arnd@xxxxxxxx>
    Link: https://lore.kernel.org/r/20210425174945.164612-1-krzysztof.kozlowski@xxxxxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index 700763e07083..83d1d1327f96 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -55,6 +55,7 @@ void __init exynos_sysram_init(void)
 		sysram_base_addr = of_iomap(node, 0);
 		sysram_base_phys = of_translate_address(node,
 					   of_get_address(node, 0, NULL, NULL));
+		of_node_put(node);
 		break;
 	}
 
@@ -62,6 +63,7 @@ void __init exynos_sysram_init(void)
 		if (!of_device_is_available(node))
 			continue;
 		sysram_ns_base_addr = of_iomap(node, 0);
+		of_node_put(node);
 		break;
 	}
 }



[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