Skip to content

Commit 00f04a3

Browse files
Ricardo Cañuelogregkh
authored andcommitted
Revert "thermal/drivers/mediatek: Use devm_of_iomap to avoid resource leak in mtk_thermal_probe"
commit 86edac7 upstream. This reverts commit f05c7b7. 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: f05c7b7 ("thermal/drivers/mediatek: Use devm_of_iomap to avoid resource leak in mtk_thermal_probe") Signed-off-by: Ricardo Cañuelo <[email protected]> Suggested-by: AngeloGioacchino Del Regno <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent a536383 commit 00f04a3

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

drivers/thermal/mtk_thermal.c

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,12 +1028,7 @@ static int mtk_thermal_probe(struct platform_device *pdev)
10281028
return -ENODEV;
10291029
}
10301030

1031-
auxadc_base = devm_of_iomap(&pdev->dev, auxadc, 0, NULL);
1032-
if (IS_ERR(auxadc_base)) {
1033-
of_node_put(auxadc);
1034-
return PTR_ERR(auxadc_base);
1035-
}
1036-
1031+
auxadc_base = of_iomap(auxadc, 0);
10371032
auxadc_phys_base = of_get_phys_base(auxadc);
10381033

10391034
of_node_put(auxadc);
@@ -1049,12 +1044,7 @@ static int mtk_thermal_probe(struct platform_device *pdev)
10491044
return -ENODEV;
10501045
}
10511046

1052-
apmixed_base = devm_of_iomap(&pdev->dev, apmixedsys, 0, NULL);
1053-
if (IS_ERR(apmixed_base)) {
1054-
of_node_put(apmixedsys);
1055-
return PTR_ERR(apmixed_base);
1056-
}
1057-
1047+
apmixed_base = of_iomap(apmixedsys, 0);
10581048
apmixed_phys_base = of_get_phys_base(apmixedsys);
10591049

10601050
of_node_put(apmixedsys);

0 commit comments

Comments
 (0)