diff options
author | Tzung-Bi Shih <tzungbi@google.com> | 2020-12-03 23:59:14 +0800 |
---|---|---|
committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2020-12-10 13:31:47 -0600 |
commit | 22c3df6f5574c8d401ea431c7ce24e7c5c5e7ef3 (patch) | |
tree | f6bb2d0d88a60f02088997d308d6a764e58b2ef2 /drivers/remoteproc/mtk_scp.c | |
parent | c3d4e5b12672bbdf63f4cc933e3169bc6bbec8da (diff) | |
download | linux-22c3df6f5574c8d401ea431c7ce24e7c5c5e7ef3.tar.bz2 |
remoteproc/mediatek: unprepare clk if scp_before_load fails
Fixes the error handling to unprepare clk if scp_before_load fails.
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Fixes: fd0b6c1ff85a ("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>
Diffstat (limited to 'drivers/remoteproc/mtk_scp.c')
-rw-r--r-- | drivers/remoteproc/mtk_scp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c index 5f42b9ce7185..5e5705fe35a8 100644 --- a/drivers/remoteproc/mtk_scp.c +++ b/drivers/remoteproc/mtk_scp.c @@ -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; |