Skip to contentSkip to conversation

remoteproc/mediatek: unprepare clk if scp_before_load fails

PATCH Applied Tzung-Bi Shih 3 participants 3 messages Dec 3, 2020 – Dec 10, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 remoteproc/mediatek: unprepare clk if scp_before_load fails

Fixes the error handling to unprepare clk if scp_before_load fails.

Fixes fd0b6c1ff85a ("remoteproc/mediatek: Add support for mt8192 SCP")

---
Changes from v2[2]:
- fix the "Fixes" tag format

Changes from v1[1]:
- add "Fixes" tag
- remove an unneeded change

[1]: https://patchwork.kernel.org/project/linux-remoteproc/patch/[email protected]/
[2]: https://patchwork.kernel.org/project/linux-remoteproc/patch/[email protected]/

 drivers/remoteproc/mtk_scp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/remoteproc/mtk_scp.c +2 -1
index 5f42b9ce7185..5e5705fe35a8 100644
@@ -350,9 +350,10 @@ static int scp_load(struct rproc *rproc, const struct firmware *fw)
 
 	ret = scp->data->scp_before_load(scp);
 	if (ret < 0)
-		return ret;
+		goto leave;
 
 	ret = scp_elf_load_segments(rproc, fw);
+leave:
 	clk_disable_unprepare(scp->clk);
 
 	return ret;
Signature · 7 lines
2.29.2.454.gaff20da3a2-goog


_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
maintainer Reviewed-by on v3 1/1
#1 lore raw
Quoted 4 lines · Tzung-Bi Shih

Fixes the error handling to unprepare clk if scp_before_load fails.

Fixes fd0b6c1ff85a ("remoteproc/mediatek: Add support for mt8192 SCP")
Quoted 33 lines

---
Changes from v2[2]:
- fix the "Fixes" tag format

Changes from v1[1]:
- add "Fixes" tag
- remove an unneeded change

[1]: https://patchwork.kernel.org/project/linux-remoteproc/patch/[email protected]/
[2]: https://patchwork.kernel.org/project/linux-remoteproc/patch/[email protected]/

 drivers/remoteproc/mtk_scp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/remoteproc/mtk_scp.c +2 -1
index 5f42b9ce7185..5e5705fe35a8 100644
@@ -350,9 +350,10 @@ static int scp_load(struct rproc *rproc, const struct firmware *fw)
 
 	ret = scp->data->scp_before_load(scp);
 	if (ret < 0)
-		return ret;
+		goto leave;
 
 	ret = scp_elf_load_segments(rproc, fw);
+leave:
 	clk_disable_unprepare(scp->clk);
 
 	return ret;
Signature · 1 line
2.29.2.454.gaff20da3a2-goog

_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek

#2 lore raw
In reply to Tzung-Bi Shih
This patch was applied to andersson/remoteproc.git (refs/heads/for-next):

Hello:

This patch was applied to andersson/remoteproc.git (refs/heads/for-next):

Quoted 9 lines · On Thu, 3 Dec 2020 23:59:14 +0800 you wrote:

Fixes the error handling to unprepare clk if scp_before_load fails.

Fixes fd0b6c1ff85a ("remoteproc/mediatek: Add support for mt8192 SCP")

---
Changes from v2[2]:
- fix the "Fixes" tag format

[...]

Here is the summary with links:
- [v3] remoteproc/mediatek: unprepare clk if scp_before_load fails

    https://git.kernel.org/andersson/remoteproc/c/22c3df6f5574

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html