Commit 22c3df6f authored by Tzung-Bi Shih's avatar Tzung-Bi Shih Committed by Bjorn Andersson

remoteproc/mediatek: unprepare clk if scp_before_load fails

Fixes the error handling to unprepare clk if scp_before_load fails.
Reviewed-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
Fixes: fd0b6c1f ("remoteproc/mediatek: Add support for mt8192 SCP")
Signed-off-by: default avatarTzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20201203155914.3844426-1-tzungbi@google.comSigned-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
parent c3d4e5b1
...@@ -350,9 +350,10 @@ static int scp_load(struct rproc *rproc, const struct firmware *fw) ...@@ -350,9 +350,10 @@ static int scp_load(struct rproc *rproc, const struct firmware *fw)
ret = scp->data->scp_before_load(scp); ret = scp->data->scp_before_load(scp);
if (ret < 0) if (ret < 0)
return ret; goto leave;
ret = scp_elf_load_segments(rproc, fw); ret = scp_elf_load_segments(rproc, fw);
leave:
clk_disable_unprepare(scp->clk); clk_disable_unprepare(scp->clk);
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment