Skip to content

Commit

Permalink
Revert "thermal/drivers/mediatek: Use devm_of_iomap to avoid resource…
Browse files Browse the repository at this point in the history
… 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 <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>
  • Loading branch information
Ricardo Cañuelo authored and Greg Kroah-Hartman committed Jul 1, 2023
1 parent a536383 commit 00f04a3
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions drivers/thermal/mtk_thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -1028,12 +1028,7 @@ static int mtk_thermal_probe(struct platform_device *pdev)
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);
Expand All @@ -1049,12 +1044,7 @@ static int mtk_thermal_probe(struct platform_device *pdev)
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);
Expand Down

0 comments on commit 00f04a3

Please sign in to comment.