[PATCH v4 1/2] thermal: mediatek: use devm_of_iomap to avoid resource leak in mtk_thermal_probe

AngeloGioacchino Del Regno angelogioacchino.delregno at collabora.com
Tue Apr 18 02:25:47 PDT 2023


Il 17/04/23 14:55, Kang Chen ha scritto:
> Smatch reports:
> 1. mtk_thermal_probe() warn: 'apmixed_base' from of_iomap() not released.
> 2. mtk_thermal_probe() warn: 'auxadc_base' from of_iomap() not released.
> 
> The original code forgets to release iomap resource when handling errors,
> fix it by switch to devm_of_iomap.
> 
> Fixes: 89945047b166 ("thermal: mediatek: Add tsensor support for V2 thermal system")
> Signed-off-by: Kang Chen <void0red at hust.edu.cn>
> Reviewed-by: Dongliang Mu <dzm91 at hust.edu.cn>

Good job!

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>





More information about the linux-arm-kernel mailing list