Skip to content
Commit 67ca3f98 authored by Nícolas F. R. A. Prado's avatar Nícolas F. R. A. Prado Committed by Mathieu Poirier
Browse files

remoteproc: mediatek: Don't attempt to remap l1tcm memory if missing



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: ca23ecfd ("remoteproc/mediatek: support L1TCM")
Signed-off-by: default avatarNícolas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: default avatarTzung-Bi Shih <tzungbi@kernel.org>
Reviewed-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240627-scp-invalid-resource-l1tcm-v1-1-7d221e6c495a@collabora.com


Signed-off-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
parent 5b9f51b2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment