From 7c32919a378782c95c72bc028b5c30dfe8c11f82 Mon Sep 17 00:00:00 2001 From: Liang He Date: Tue, 28 Jun 2022 19:29:39 +0800 Subject: ARM: OMAP2+: omap4-common: Fix refcount leak bug In omap4_sram_init(), of_find_compatible_node() will return a node pointer with refcount incremented. We should use of_node_put() when it is not used anymore. Signed-off-by: Liang He Message-Id: <20220628112939.160737-1-windhl@126.com> Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/omap4-common.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/arm/mach-omap2') diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c index 6d1eb4eefefe..d9ed2a5dcd5e 100644 --- a/arch/arm/mach-omap2/omap4-common.c +++ b/arch/arm/mach-omap2/omap4-common.c @@ -140,6 +140,7 @@ static int __init omap4_sram_init(void) __func__); else sram_sync = (void __iomem *)gen_pool_alloc(sram_pool, PAGE_SIZE); + of_node_put(np); return 0; } -- cgit From ed8167cbf65c2b6ff6faeb0f96ded4d6d581e1ac Mon Sep 17 00:00:00 2001 From: Chen Hui Date: Tue, 8 Nov 2022 22:19:17 +0800 Subject: ARM: OMAP2+: Fix memory leak in realtime_counter_init() The "sys_clk" resource is malloced by clk_get(), it is not released when the function return. Fixes: fa6d79d27614 ("ARM: OMAP: Add initialisation for the real-time counter.") Signed-off-by: Chen Hui Message-Id: <20221108141917.46796-1-judy.chenhui@huawei.com> Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/timer.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/arm/mach-omap2') diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index 620ba69c8f11..5677c4a08f37 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c @@ -76,6 +76,7 @@ static void __init realtime_counter_init(void) } rate = clk_get_rate(sys_clk); + clk_put(sys_clk); if (soc_is_dra7xx()) { /* -- cgit From 4dc6a7170a005d8a911bf55187bfd580b96b49e2 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Wed, 9 Nov 2022 14:36:55 +0100 Subject: ARM: OMAP2+: Remove unneeded #include Commit 44c22a2d12a5c04d ("ARM: OMAP2+: pm33xx: Add support for rtc+ddr in self refresh mode") added the include, but no user. Signed-off-by: Geert Uytterhoeven Message-Id: <7f22fb21f76f4d23be2e31a5908bcfa295704ef4.1668000965.git.geert+renesas@glider.be> Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/pm33xx-core.c | 1 - 1 file changed, 1 deletion(-) (limited to 'arch/arm/mach-omap2') diff --git a/arch/arm/mach-omap2/pm33xx-core.c b/arch/arm/mach-omap2/pm33xx-core.c index bf0d25fd2cea..711bcc6c8ddd 100644 --- a/arch/arm/mach-omap2/pm33xx-core.c +++ b/arch/arm/mach-omap2/pm33xx-core.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include -- cgit From 5dbbc9e00c29767b31192dc314b009d314856c4f Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Wed, 9 Nov 2022 14:37:57 +0100 Subject: ARM: OMAP2+: Remove unneeded #include Commit 6f3ab009a178098e ("ARM: OMAP2+: Remove unused legacy code for device init") removed the last user of the pinctrl machine API. Signed-off-by: Geert Uytterhoeven Message-Id: <5dd5e235af9b3def7f4a431edc7bb8504b0681bf.1668001020.git.geert+renesas@glider.be> Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/devices.c | 1 - 1 file changed, 1 deletion(-) (limited to 'arch/arm/mach-omap2') diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 5a2e198e7db1..8e6d4116d49c 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include -- cgit From 5fc1f76a85ce50b501b1d2ef04a29bc79910807d Mon Sep 17 00:00:00 2001 From: Nir Levy Date: Wed, 23 Nov 2022 15:17:20 +0200 Subject: ARM: OMAP2+: Fix spelling typos in comment Fix spelling: adress -> address Signed-off-by: Nir Levy Message-Id: <20221123131720.79978-1-bhr166@gmail.com> Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/sleep34xx.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm/mach-omap2') diff --git a/arch/arm/mach-omap2/sleep34xx.S b/arch/arm/mach-omap2/sleep34xx.S index c4e97d35c310..781a131b40a6 100644 --- a/arch/arm/mach-omap2/sleep34xx.S +++ b/arch/arm/mach-omap2/sleep34xx.S @@ -465,7 +465,7 @@ l2_inv_gp: mov r12, #0x2 smc #0 @ Call SMI monitor (smieq) logic_l1_restore: - adr r0, l2dis_3630_offset @ adress for offset + adr r0, l2dis_3630_offset @ address for offset ldr r1, [r0] @ value for offset ldr r1, [r0, r1] @ value at l2dis_3630 cmp r1, #0x1 @ Test if L2 re-enable needed on 3630 -- cgit