Skip to content

Commit 86edac7

Browse files
Ricardo Cañuelodlezcano
authored andcommitted
Revert "thermal/drivers/mediatek: Use devm_of_iomap to avoid resource leak in mtk_thermal_probe"
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]
1 parent 4af164c commit 86edac7

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

drivers/thermal/mediatek/auxadc_thermal.c

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1222,12 +1222,7 @@ static int mtk_thermal_probe(struct platform_device *pdev)
12221222
return -ENODEV;
12231223
}
12241224

1225-
auxadc_base = devm_of_iomap(&pdev->dev, auxadc, 0, NULL);
1226-
if (IS_ERR(auxadc_base)) {
1227-
of_node_put(auxadc);
1228-
return PTR_ERR(auxadc_base);
1229-
}
1230-
1225+
auxadc_base = of_iomap(auxadc, 0);
12311226
auxadc_phys_base = of_get_phys_base(auxadc);
12321227

12331228
of_node_put(auxadc);
@@ -1243,12 +1238,7 @@ static int mtk_thermal_probe(struct platform_device *pdev)
12431238
return -ENODEV;
12441239
}
12451240

1246-
apmixed_base = devm_of_iomap(&pdev->dev, apmixedsys, 0, NULL);
1247-
if (IS_ERR(apmixed_base)) {
1248-
of_node_put(apmixedsys);
1249-
return PTR_ERR(apmixed_base);
1250-
}
1251-
1241+
apmixed_base = of_iomap(apmixedsys, 0);
12521242
apmixed_phys_base = of_get_phys_base(apmixedsys);
12531243

12541244
of_node_put(apmixedsys);

0 commit comments

Comments
 (0)