summaryrefslogtreecommitdiffstats
path: root/drivers/remoteproc
diff options
context:
space:
mode:
authorTzung-Bi Shih <tzungbi@google.com>2020-12-03 23:59:14 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-12-30 11:53:48 +0100
commit6ca59ab95f9fc1b853602a8b51ccbde46c3e41ec (patch)
treeedf5424cc4dbe2ce583e307971b41cebdf959907 /drivers/remoteproc
parent9d909187e538b7b1603cf453f5d7240e9f36c293 (diff)
downloadlinux-stable-6ca59ab95f9fc1b853602a8b51ccbde46c3e41ec.tar.gz
linux-stable-6ca59ab95f9fc1b853602a8b51ccbde46c3e41ec.tar.bz2
linux-stable-6ca59ab95f9fc1b853602a8b51ccbde46c3e41ec.zip
remoteproc/mediatek: unprepare clk if scp_before_load fails
[ Upstream commit 22c3df6f5574c8d401ea431c7ce24e7c5c5e7ef3 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/remoteproc')
-rw-r--r--drivers/remoteproc/mtk_scp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c
index f74f22d4d1ff..52fa01d67c18 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;