Commit 67ca3f9
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: ca23ecf ("remoteproc/mediatek: support L1TCM")
Signed-off-by: Nícolas F. R. A. Prado <[email protected]>
Reviewed-by: Tzung-Bi Shih <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Link: https://lore.kernel.org/r/20240627-scp-invalid-resource-l1tcm-v1-1-7d221e6c495a@collabora.com
Signed-off-by: Mathieu Poirier <[email protected]>1 parent 5b9f51b commit 67ca3f9
1 file changed
+5
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1344 | 1344 | | |
1345 | 1345 | | |
1346 | 1346 | | |
1347 | | - | |
1348 | | - | |
1349 | | - | |
1350 | | - | |
1351 | | - | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
1352 | 1352 | | |
1353 | | - | |
1354 | | - | |
1355 | 1353 | | |
1356 | 1354 | | |
1357 | 1355 | | |
| |||
0 commit comments