aboutsummaryrefslogtreecommitdiff
path: root/lib/crypto/mpi/mpi-inv.c
diff options
context:
space:
mode:
authorNĂ­colas F. R. A. Prado <nfraprado@collabora.com>2024-06-27 17:20:55 -0400
committerMathieu Poirier <mathieu.poirier@linaro.org>2024-06-28 11:56:24 -0600
commit67ca3f98070ffdf308b91e08a477fcb1e9684ae8 (patch)
tree754f8ef5fe67a70d9daa174630ff2e8674c41181 /lib/crypto/mpi/mpi-inv.c
parent5b9f51b200dcb2c3924ecbff324fa52f1faa84d3 (diff)
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: ca23ecfdbd44 ("remoteproc/mediatek: support L1TCM") Signed-off-by: NĂ­colas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org> Reviewed-by: AngeloGioacchino 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: Mathieu Poirier <mathieu.poirier@linaro.org>
Diffstat (limited to 'lib/crypto/mpi/mpi-inv.c')
0 files changed, 0 insertions, 0 deletions