Skip to content

Commit 599d169

Browse files
committed
Merge tag 'mips-fixes_5.19_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux
Pull MIPS fixes from Thomas Bogendoerfer: - several refcount fixes - added missing clock for ingenic - fix wrong irq_err_count for vr41xx * tag 'mips-fixes_5.19_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: mips: lantiq: Add missing of_node_put() in irq.c mips: dts: ingenic: Add TCU clock to x1000/x1830 tcu device node mips/pic32/pic32mzda: Fix refcount leak bugs mips: lantiq: xway: Fix refcount leak bug in sysctrl mips: lantiq: falcon: Fix refcount leak bug in sysctrl mips: ralink: Fix refcount leak in of.c mips: mti-malta: Fix refcount leak in malta-time.c arch: mips: generic: Add missing of_node_put() in board-ranchu.c MIPS: Remove repetitive increase irq_err_count
2 parents 399bd66 + 3748d21 commit 599d169

File tree

12 files changed

+31
-9
lines changed

12 files changed

+31
-9
lines changed

arch/mips/boot/dts/ingenic/x1000.dtsi

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,9 @@
111111

112112
clocks = <&cgu X1000_CLK_RTCLK>,
113113
<&cgu X1000_CLK_EXCLK>,
114-
<&cgu X1000_CLK_PCLK>;
115-
clock-names = "rtc", "ext", "pclk";
114+
<&cgu X1000_CLK_PCLK>,
115+
<&cgu X1000_CLK_TCU>;
116+
clock-names = "rtc", "ext", "pclk", "tcu";
116117

117118
interrupt-controller;
118119
#interrupt-cells = <1>;

arch/mips/boot/dts/ingenic/x1830.dtsi

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,9 @@
104104

105105
clocks = <&cgu X1830_CLK_RTCLK>,
106106
<&cgu X1830_CLK_EXCLK>,
107-
<&cgu X1830_CLK_PCLK>;
108-
clock-names = "rtc", "ext", "pclk";
107+
<&cgu X1830_CLK_PCLK>,
108+
<&cgu X1830_CLK_TCU>;
109+
clock-names = "rtc", "ext", "pclk", "tcu";
109110

110111
interrupt-controller;
111112
#interrupt-cells = <1>;

arch/mips/generic/board-ranchu.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ static __init unsigned int ranchu_measure_hpt_freq(void)
4444
__func__);
4545

4646
rtc_base = of_iomap(np, 0);
47+
of_node_put(np);
4748
if (!rtc_base)
4849
panic("%s(): Failed to ioremap Goldfish RTC base!", __func__);
4950

arch/mips/lantiq/falcon/sysctrl.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,12 @@ void __init ltq_soc_init(void)
208208
of_address_to_resource(np_sysgpe, 0, &res_sys[2]))
209209
panic("Failed to get core resources");
210210

211+
of_node_put(np_status);
212+
of_node_put(np_ebu);
213+
of_node_put(np_sys1);
214+
of_node_put(np_syseth);
215+
of_node_put(np_sysgpe);
216+
211217
if ((request_mem_region(res_status.start, resource_size(&res_status),
212218
res_status.name) < 0) ||
213219
(request_mem_region(res_ebu.start, resource_size(&res_ebu),

arch/mips/lantiq/irq.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,7 @@ int __init icu_of_init(struct device_node *node, struct device_node *parent)
408408
if (!ltq_eiu_membase)
409409
panic("Failed to remap eiu memory");
410410
}
411+
of_node_put(eiu_node);
411412

412413
return 0;
413414
}

arch/mips/lantiq/xway/sysctrl.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,10 @@ void __init ltq_soc_init(void)
441441
of_address_to_resource(np_ebu, 0, &res_ebu))
442442
panic("Failed to get core resources");
443443

444+
of_node_put(np_pmu);
445+
of_node_put(np_cgu);
446+
of_node_put(np_ebu);
447+
444448
if (!request_mem_region(res_pmu.start, resource_size(&res_pmu),
445449
res_pmu.name) ||
446450
!request_mem_region(res_cgu.start, resource_size(&res_cgu),

arch/mips/mti-malta/malta-time.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,8 @@ static void update_gic_frequency_dt(void)
214214

215215
if (of_update_property(node, &gic_frequency_prop) < 0)
216216
pr_err("error updating gic frequency property\n");
217+
218+
of_node_put(node);
217219
}
218220

219221
#endif

arch/mips/pic32/pic32mzda/init.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,18 @@ static int __init pic32_of_prepare_platform_data(struct of_dev_auxdata *lookup)
9898
np = of_find_compatible_node(NULL, NULL, lookup->compatible);
9999
if (np) {
100100
lookup->name = (char *)np->name;
101-
if (lookup->phys_addr)
101+
if (lookup->phys_addr) {
102+
of_node_put(np);
102103
continue;
104+
}
103105
if (!of_address_to_resource(np, 0, &res))
104106
lookup->phys_addr = res.start;
107+
of_node_put(np);
105108
}
106109
}
107110

111+
of_node_put(root);
112+
108113
return 0;
109114
}
110115

arch/mips/pic32/pic32mzda/time.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ static unsigned int pic32_xlate_core_timer_irq(void)
3232
goto default_map;
3333

3434
irq = irq_of_parse_and_map(node, 0);
35+
36+
of_node_put(node);
37+
3538
if (!irq)
3639
goto default_map;
3740

arch/mips/ralink/of.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ __iomem void *plat_of_remap_node(const char *node)
4040
if (of_address_to_resource(np, 0, &res))
4141
panic("Failed to get resource for %s", node);
4242

43+
of_node_put(np);
44+
4345
if (!request_mem_region(res.start,
4446
resource_size(&res),
4547
res.name))

0 commit comments

Comments
 (0)