]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob
9c9825c358bcaa8ec28a95d041f5b7b8c83f900b
[thirdparty/kernel/stable-queue.git] /
1 From 86edac7d3888c715fe3a81bd61f3617ecfe2e1dd Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Ricardo=20Ca=C3=B1uelo?= <ricardo.canuelo@collabora.com>
3 Date: Thu, 25 May 2023 14:18:11 +0200
4 Subject: Revert "thermal/drivers/mediatek: Use devm_of_iomap to avoid resource leak in mtk_thermal_probe"
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 From: Ricardo Cañuelo <ricardo.canuelo@collabora.com>
10
11 commit 86edac7d3888c715fe3a81bd61f3617ecfe2e1dd upstream.
12
13 This reverts commit f05c7b7d9ea9477fcc388476c6f4ade8c66d2d26.
14
15 That change was causing a regression in the generic-adc-thermal-probed
16 bootrr test as reported in the kernelci-results list [1].
17 A proper rework will take longer, so revert it for now.
18
19 [1] https://groups.io/g/kernelci-results/message/42660
20
21 Fixes: f05c7b7d9ea9 ("thermal/drivers/mediatek: Use devm_of_iomap to avoid resource leak in mtk_thermal_probe")
22 Signed-off-by: Ricardo Cañuelo <ricardo.canuelo@collabora.com>
23 Suggested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
24 Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
25 Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
26 Link: https://lore.kernel.org/r/20230525121811.3360268-1-ricardo.canuelo@collabora.com
27 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
28 ---
29 drivers/thermal/mediatek/auxadc_thermal.c | 14 ++------------
30 1 file changed, 2 insertions(+), 12 deletions(-)
31
32 --- a/drivers/thermal/mediatek/auxadc_thermal.c
33 +++ b/drivers/thermal/mediatek/auxadc_thermal.c
34 @@ -1142,12 +1142,7 @@ static int mtk_thermal_probe(struct plat
35 return -ENODEV;
36 }
37
38 - auxadc_base = devm_of_iomap(&pdev->dev, auxadc, 0, NULL);
39 - if (IS_ERR(auxadc_base)) {
40 - of_node_put(auxadc);
41 - return PTR_ERR(auxadc_base);
42 - }
43 -
44 + auxadc_base = of_iomap(auxadc, 0);
45 auxadc_phys_base = of_get_phys_base(auxadc);
46
47 of_node_put(auxadc);
48 @@ -1163,12 +1158,7 @@ static int mtk_thermal_probe(struct plat
49 return -ENODEV;
50 }
51
52 - apmixed_base = devm_of_iomap(&pdev->dev, apmixedsys, 0, NULL);
53 - if (IS_ERR(apmixed_base)) {
54 - of_node_put(apmixedsys);
55 - return PTR_ERR(apmixed_base);
56 - }
57 -
58 + apmixed_base = of_iomap(apmixedsys, 0);
59 apmixed_phys_base = of_get_phys_base(apmixedsys);
60
61 of_node_put(apmixedsys);