Commit 599d1691 authored by Linus Torvalds's avatar Linus Torvalds

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
parents 399bd66e 3748d218
...@@ -111,8 +111,9 @@ tcu: timer@10002000 { ...@@ -111,8 +111,9 @@ tcu: timer@10002000 {
clocks = <&cgu X1000_CLK_RTCLK>, clocks = <&cgu X1000_CLK_RTCLK>,
<&cgu X1000_CLK_EXCLK>, <&cgu X1000_CLK_EXCLK>,
<&cgu X1000_CLK_PCLK>; <&cgu X1000_CLK_PCLK>,
clock-names = "rtc", "ext", "pclk"; <&cgu X1000_CLK_TCU>;
clock-names = "rtc", "ext", "pclk", "tcu";
interrupt-controller; interrupt-controller;
#interrupt-cells = <1>; #interrupt-cells = <1>;
......
...@@ -104,8 +104,9 @@ tcu: timer@10002000 { ...@@ -104,8 +104,9 @@ tcu: timer@10002000 {
clocks = <&cgu X1830_CLK_RTCLK>, clocks = <&cgu X1830_CLK_RTCLK>,
<&cgu X1830_CLK_EXCLK>, <&cgu X1830_CLK_EXCLK>,
<&cgu X1830_CLK_PCLK>; <&cgu X1830_CLK_PCLK>,
clock-names = "rtc", "ext", "pclk"; <&cgu X1830_CLK_TCU>;
clock-names = "rtc", "ext", "pclk", "tcu";
interrupt-controller; interrupt-controller;
#interrupt-cells = <1>; #interrupt-cells = <1>;
......
...@@ -44,6 +44,7 @@ static __init unsigned int ranchu_measure_hpt_freq(void) ...@@ -44,6 +44,7 @@ static __init unsigned int ranchu_measure_hpt_freq(void)
__func__); __func__);
rtc_base = of_iomap(np, 0); rtc_base = of_iomap(np, 0);
of_node_put(np);
if (!rtc_base) if (!rtc_base)
panic("%s(): Failed to ioremap Goldfish RTC base!", __func__); panic("%s(): Failed to ioremap Goldfish RTC base!", __func__);
......
...@@ -208,6 +208,12 @@ void __init ltq_soc_init(void) ...@@ -208,6 +208,12 @@ void __init ltq_soc_init(void)
of_address_to_resource(np_sysgpe, 0, &res_sys[2])) of_address_to_resource(np_sysgpe, 0, &res_sys[2]))
panic("Failed to get core resources"); panic("Failed to get core resources");
of_node_put(np_status);
of_node_put(np_ebu);
of_node_put(np_sys1);
of_node_put(np_syseth);
of_node_put(np_sysgpe);
if ((request_mem_region(res_status.start, resource_size(&res_status), if ((request_mem_region(res_status.start, resource_size(&res_status),
res_status.name) < 0) || res_status.name) < 0) ||
(request_mem_region(res_ebu.start, resource_size(&res_ebu), (request_mem_region(res_ebu.start, resource_size(&res_ebu),
......
...@@ -408,6 +408,7 @@ int __init icu_of_init(struct device_node *node, struct device_node *parent) ...@@ -408,6 +408,7 @@ int __init icu_of_init(struct device_node *node, struct device_node *parent)
if (!ltq_eiu_membase) if (!ltq_eiu_membase)
panic("Failed to remap eiu memory"); panic("Failed to remap eiu memory");
} }
of_node_put(eiu_node);
return 0; return 0;
} }
......
...@@ -441,6 +441,10 @@ void __init ltq_soc_init(void) ...@@ -441,6 +441,10 @@ void __init ltq_soc_init(void)
of_address_to_resource(np_ebu, 0, &res_ebu)) of_address_to_resource(np_ebu, 0, &res_ebu))
panic("Failed to get core resources"); panic("Failed to get core resources");
of_node_put(np_pmu);
of_node_put(np_cgu);
of_node_put(np_ebu);
if (!request_mem_region(res_pmu.start, resource_size(&res_pmu), if (!request_mem_region(res_pmu.start, resource_size(&res_pmu),
res_pmu.name) || res_pmu.name) ||
!request_mem_region(res_cgu.start, resource_size(&res_cgu), !request_mem_region(res_cgu.start, resource_size(&res_cgu),
......
...@@ -214,6 +214,8 @@ static void update_gic_frequency_dt(void) ...@@ -214,6 +214,8 @@ static void update_gic_frequency_dt(void)
if (of_update_property(node, &gic_frequency_prop) < 0) if (of_update_property(node, &gic_frequency_prop) < 0)
pr_err("error updating gic frequency property\n"); pr_err("error updating gic frequency property\n");
of_node_put(node);
} }
#endif #endif
......
...@@ -98,13 +98,18 @@ static int __init pic32_of_prepare_platform_data(struct of_dev_auxdata *lookup) ...@@ -98,13 +98,18 @@ static int __init pic32_of_prepare_platform_data(struct of_dev_auxdata *lookup)
np = of_find_compatible_node(NULL, NULL, lookup->compatible); np = of_find_compatible_node(NULL, NULL, lookup->compatible);
if (np) { if (np) {
lookup->name = (char *)np->name; lookup->name = (char *)np->name;
if (lookup->phys_addr) if (lookup->phys_addr) {
of_node_put(np);
continue; continue;
}
if (!of_address_to_resource(np, 0, &res)) if (!of_address_to_resource(np, 0, &res))
lookup->phys_addr = res.start; lookup->phys_addr = res.start;
of_node_put(np);
} }
} }
of_node_put(root);
return 0; return 0;
} }
......
...@@ -32,6 +32,9 @@ static unsigned int pic32_xlate_core_timer_irq(void) ...@@ -32,6 +32,9 @@ static unsigned int pic32_xlate_core_timer_irq(void)
goto default_map; goto default_map;
irq = irq_of_parse_and_map(node, 0); irq = irq_of_parse_and_map(node, 0);
of_node_put(node);
if (!irq) if (!irq)
goto default_map; goto default_map;
......
...@@ -40,6 +40,8 @@ __iomem void *plat_of_remap_node(const char *node) ...@@ -40,6 +40,8 @@ __iomem void *plat_of_remap_node(const char *node)
if (of_address_to_resource(np, 0, &res)) if (of_address_to_resource(np, 0, &res))
panic("Failed to get resource for %s", node); panic("Failed to get resource for %s", node);
of_node_put(np);
if (!request_mem_region(res.start, if (!request_mem_region(res.start,
resource_size(&res), resource_size(&res),
res.name)) res.name))
......
...@@ -640,8 +640,6 @@ static int icu_get_irq(unsigned int irq) ...@@ -640,8 +640,6 @@ static int icu_get_irq(unsigned int irq)
printk(KERN_ERR "spurious ICU interrupt: %04x,%04x\n", pend1, pend2); printk(KERN_ERR "spurious ICU interrupt: %04x,%04x\n", pend1, pend2);
atomic_inc(&irq_err_count);
return -1; return -1;
} }
......
...@@ -217,8 +217,6 @@ static int giu_get_irq(unsigned int irq) ...@@ -217,8 +217,6 @@ static int giu_get_irq(unsigned int irq)
printk(KERN_ERR "spurious GIU interrupt: %04x(%04x),%04x(%04x)\n", printk(KERN_ERR "spurious GIU interrupt: %04x(%04x),%04x(%04x)\n",
maskl, pendl, maskh, pendh); maskl, pendl, maskh, pendh);
atomic_inc(&irq_err_count);
return -EINVAL; return -EINVAL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment