[PATCH] remoteproc: mediatek: Don't attempt to remap l1tcm memory if missing
AngeloGioacchino Del Regno
angelogioacchino.delregno at collabora.com
Fri Jun 28 02:53:23 PDT 2024
Il 27/06/24 23:20, Nícolas F. R. A. Prado ha scritto:
> The current code doesn't check whether platform_get_resource_byname()
> succeeded to get the l1tcm memory, which is optional, before attempting
> to map it. This results in the following error message when it is
> missing:
>
> mtk-scp 10500000.scp: error -EINVAL: invalid resource (null)
>
> Add a check so that the remapping is only attempted if the memory region
> exists. This also allows to simplify the logic handling failure to
> remap, since a failure then is always a failure.
>
> Fixes: ca23ecfdbd44 ("remoteproc/mediatek: support L1TCM")
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado at collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>
More information about the Linux-mediatek
mailing list