]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Jun 2023 18:32:11 +0000 (20:32 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Jun 2023 18:32:11 +0000 (20:32 +0200)
added patches:
revert-thermal-drivers-mediatek-use-devm_of_iomap-to-avoid-resource-leak-in-mtk_thermal_probe.patch

queue-5.10/revert-thermal-drivers-mediatek-use-devm_of_iomap-to-avoid-resource-leak-in-mtk_thermal_probe.patch [new file with mode: 0644]
queue-5.10/series

diff --git a/queue-5.10/revert-thermal-drivers-mediatek-use-devm_of_iomap-to-avoid-resource-leak-in-mtk_thermal_probe.patch b/queue-5.10/revert-thermal-drivers-mediatek-use-devm_of_iomap-to-avoid-resource-leak-in-mtk_thermal_probe.patch
new file mode 100644 (file)
index 0000000..7286d40
--- /dev/null
@@ -0,0 +1,61 @@
+From 86edac7d3888c715fe3a81bd61f3617ecfe2e1dd Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ricardo=20Ca=C3=B1uelo?= <ricardo.canuelo@collabora.com>
+Date: Thu, 25 May 2023 14:18:11 +0200
+Subject: Revert "thermal/drivers/mediatek: Use devm_of_iomap to avoid resource leak in mtk_thermal_probe"
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Ricardo Cañuelo <ricardo.canuelo@collabora.com>
+
+commit 86edac7d3888c715fe3a81bd61f3617ecfe2e1dd upstream.
+
+This reverts commit f05c7b7d9ea9477fcc388476c6f4ade8c66d2d26.
+
+That change was causing a regression in the generic-adc-thermal-probed
+bootrr test as reported in the kernelci-results list [1].
+A proper rework will take longer, so revert it for now.
+
+[1] https://groups.io/g/kernelci-results/message/42660
+
+Fixes: f05c7b7d9ea9 ("thermal/drivers/mediatek: Use devm_of_iomap to avoid resource leak in mtk_thermal_probe")
+Signed-off-by: Ricardo Cañuelo <ricardo.canuelo@collabora.com>
+Suggested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
+Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
+Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
+Link: https://lore.kernel.org/r/20230525121811.3360268-1-ricardo.canuelo@collabora.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/thermal/mtk_thermal.c |   14 ++------------
+ 1 file changed, 2 insertions(+), 12 deletions(-)
+
+--- a/drivers/thermal/mtk_thermal.c
++++ b/drivers/thermal/mtk_thermal.c
+@@ -1026,12 +1026,7 @@ static int mtk_thermal_probe(struct plat
+               return -ENODEV;
+       }
+-      auxadc_base = devm_of_iomap(&pdev->dev, auxadc, 0, NULL);
+-      if (IS_ERR(auxadc_base)) {
+-              of_node_put(auxadc);
+-              return PTR_ERR(auxadc_base);
+-      }
+-
++      auxadc_base = of_iomap(auxadc, 0);
+       auxadc_phys_base = of_get_phys_base(auxadc);
+       of_node_put(auxadc);
+@@ -1047,12 +1042,7 @@ static int mtk_thermal_probe(struct plat
+               return -ENODEV;
+       }
+-      apmixed_base = devm_of_iomap(&pdev->dev, apmixedsys, 0, NULL);
+-      if (IS_ERR(apmixed_base)) {
+-              of_node_put(apmixedsys);
+-              return PTR_ERR(apmixed_base);
+-      }
+-
++      apmixed_base = of_iomap(apmixedsys, 0);
+       apmixed_phys_base = of_get_phys_base(apmixedsys);
+       of_node_put(apmixedsys);
index d2a68e1310d5115ea2e8f246763d2f4bd5fff1a3..b738b2bdf8b0263cc89d3b0ce509785a214ff831 100644 (file)
@@ -6,3 +6,4 @@ video-imsttfb-check-for-ioremap-failures.patch
 fbdev-imsttfb-fix-use-after-free-bug-in-imsttfb_probe.patch
 hid-wacom-use-ktime_t-rather-than-int-when-dealing-with-timestamps.patch
 hid-logitech-hidpp-add-hidpp_quirk_delayed_init-for-the-t651.patch
+revert-thermal-drivers-mediatek-use-devm_of_iomap-to-avoid-resource-leak-in-mtk_thermal_probe.patch