Skip to content

Commit

Permalink
remoteproc/mediatek: unprepare clk if scp_before_load fails
Browse files Browse the repository at this point in the history
[ Upstream commit 22c3df6 ]

Fixes the error handling to unprepare clk if scp_before_load fails.

Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Fixes: fd0b6c1 ("remoteproc/mediatek: Add support for mt8192 SCP")
Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20201203155914.3844426-1-tzungbi@google.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Tzung-Bi Shih authored and gregkh committed Dec 30, 2020
1 parent 9d90918 commit 6ca59ab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/remoteproc/mtk_scp.c
Expand Up @@ -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;
Expand Down

0 comments on commit 6ca59ab

Please sign in to comment.