Re: [PATCH] soc: mdediatek: devapc: use devm_platform_ioremap_resource() instead of of_iomap()

From: Dongliang Mu
Date: Tue Apr 18 2023 - 08:07:57 EST



On 2023/4/18 18:09, AngeloGioacchino Del Regno wrote:
Il 14/04/23 11:21, zhengkang huang ha scritto:
In mtk_devapc_probe(), if of_iomap succeeds and any following error occurs,
it needs to deallocate the resource.

Fix this by repalcing of_iomap with devm_platform_ioremap_resource, which
automatically self-manages the resource. This can avoid modifying error
handling code.

Signed-off-by: zhengkang huang <zkhuang@xxxxxxxxxxx>
Reviewed-by: Dongliang Mu <dzm91@xxxxxxxxxxx>

You haven't tested this patch on any MediaTek SoC, have you?

Yes, this issue is found by static analysis and remains untested.

Sorry for the functionablity issue.

Dongliang Mu


This will break devapc.

Regards,
Angelo