+++ /dev/null
-From ebbab11defed7127dbf9a060f088c08cad67f455 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Sun, 19 Jun 2022 12:54:27 +0800
-Subject: mips/pic32/pic32mzda: Fix refcount leak bugs
-
-From: Liang He <windhl@126.com>
-
-[ Upstream commit eb9e9bc4fa5fb489c92ec588b3fb35f042ba6d86 ]
-
-of_find_matching_node(), of_find_compatible_node() and
-of_find_node_by_path() will return node pointers with refcout
-incremented. We should call of_node_put() when they are not
-used anymore.
-
-Signed-off-by: Liang He <windhl@126.com>
-Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- arch/mips/pic32/pic32mzda/init.c | 7 ++++++-
- arch/mips/pic32/pic32mzda/time.c | 3 +++
- 2 files changed, 9 insertions(+), 1 deletion(-)
-
-diff --git a/arch/mips/pic32/pic32mzda/init.c b/arch/mips/pic32/pic32mzda/init.c
-index 406c6c5cec29..f8985d4573e6 100644
---- a/arch/mips/pic32/pic32mzda/init.c
-+++ b/arch/mips/pic32/pic32mzda/init.c
-@@ -131,13 +131,18 @@ static int __init pic32_of_prepare_platform_data(struct of_dev_auxdata *lookup)
- np = of_find_compatible_node(NULL, NULL, lookup->compatible);
- if (np) {
- lookup->name = (char *)np->name;
-- if (lookup->phys_addr)
-+ if (lookup->phys_addr) {
-+ of_node_put(np);
- continue;
-+ }
- if (!of_address_to_resource(np, 0, &res))
- lookup->phys_addr = res.start;
-+ of_node_put(np);
- }
- }
-
-+ of_node_put(root);
-+
- return 0;
- }
-
-diff --git a/arch/mips/pic32/pic32mzda/time.c b/arch/mips/pic32/pic32mzda/time.c
-index 62a0a78b6c64..bfafe241c1b5 100644
---- a/arch/mips/pic32/pic32mzda/time.c
-+++ b/arch/mips/pic32/pic32mzda/time.c
-@@ -40,6 +40,9 @@ static unsigned int pic32_xlate_core_timer_irq(void)
- goto default_map;
-
- irq = irq_of_parse_and_map(node, 0);
-+
-+ of_node_put(node);
-+
- if (!irq)
- goto default_map;
-
---
-2.35.1
-
drm-vc4-crtc-use-an-union-to-store-the-page-flip-cal.patch
video-fbdev-intelfb-use-aperture-size-from-pci_resou.patch
video-fbdev-pxa3xx-gcu-fix-integer-overflow-in-pxa3x.patch
-video-fbdev-simplefb-check-before-clk_put-not-needed.patch
mips-lantiq-falcon-fix-refcount-leak-bug-in-sysctrl.patch
mips-lantiq-xway-fix-refcount-leak-bug-in-sysctrl.patch
-mips-pic32-pic32mzda-fix-refcount-leak-bugs.patch
mips-lantiq-add-missing-of_node_put-in-irq.c.patch
arm-mach-spear-add-missing-of_node_put-in-time.c.patch
wifi-mac80211-fix-uaf-in-ieee80211_scan_rx.patch
+++ /dev/null
-From 502b7bbb7aaf38fe36919b4d57cf696d48a8a061 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Thu, 2 Jun 2022 02:42:18 -0700
-Subject: video: fbdev: simplefb: Check before clk_put() not needed
-
-From: Yihao Han <hanyihao@vivo.com>
-
-[ Upstream commit 5491424d17bdeb7b7852a59367858251783f8398 ]
-
-clk_put() already checks the clk ptr using !clk and IS_ERR()
-so there is no need to check it again before calling it.
-
-Signed-off-by: Yihao Han <hanyihao@vivo.com>
-Reviewed-by: Hans de Goede <hdegoede@redhat.com>
-Signed-off-by: Helge Deller <deller@gmx.de>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/video/fbdev/simplefb.c | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/drivers/video/fbdev/simplefb.c b/drivers/video/fbdev/simplefb.c
-index 61f799a515dc..1efdbbc20f99 100644
---- a/drivers/video/fbdev/simplefb.c
-+++ b/drivers/video/fbdev/simplefb.c
-@@ -231,8 +231,7 @@ static int simplefb_clocks_init(struct simplefb_par *par,
- if (IS_ERR(clock)) {
- if (PTR_ERR(clock) == -EPROBE_DEFER) {
- while (--i >= 0) {
-- if (par->clks[i])
-- clk_put(par->clks[i]);
-+ clk_put(par->clks[i]);
- }
- kfree(par->clks);
- return -EPROBE_DEFER;
---
-2.35.1
-