remoteproc/mediatek: unprepare clk if scp_before_load fails
Subsystems (2)
PATCH 1/1 remoteproc/mediatek: unprepare clk if scp_before_load fails
Fixes the error handling to unprepare clk if scp_before_load fails.
Signed-off-by Tzung-Bi Shih <[email protected]>
--- drivers/remoteproc/mtk_scp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/remoteproc/mtk_scp.c +2 -2
@@ -350,11 +350,11 @@ 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
Mathieu Poirier
maintainerQuoted 2 lines · Tzung-Bi Shih
Fixes the error handling to unprepare clk if
scp_before_loadfails.
This requires a "Fixes:" tag.
Quoted 10 lines
Signed-off-by Tzung-Bi Shih <[email protected]>--- drivers/remoteproc/mtk_scp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/remoteproc/mtk_scp.c +0
-0
drivers/remoteproc/mtk_scp.c static int scp_load(struct rproc *rproc, const struct firmware *fw) · line 357
Quoted 10 lines
drivers/remoteproc/mtk_scp.c +2
-2@@ -350,11 +350,11 @@ 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); -
Unneeded change
Thanks,
Mathieu
Quoted 6 lines
drivers/remoteproc/mtk_scp.c +0
-0return ret; }Signature · 1 line
2.29.2.454.gaff20da3a2-goog
_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek