[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201228125040.393149541@linuxfoundation.org>
Date: Mon, 28 Dec 2020 13:46:43 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org,
Mathieu Poirier <mathieu.poirier@...aro.org>,
Tzung-Bi Shih <tzungbi@...gle.com>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH 5.10 405/717] remoteproc/mediatek: unprepare clk if scp_before_load fails
From: Tzung-Bi Shih <tzungbi@...gle.com>
[ Upstream commit 22c3df6f5574c8d401ea431c7ce24e7c5c5e7ef3 ]
Fixes the error handling to unprepare clk if scp_before_load fails.
Reviewed-by: Mathieu Poirier <mathieu.poirier@...aro.org>
Fixes: fd0b6c1ff85a ("remoteproc/mediatek: Add support for mt8192 SCP")
Signed-off-by: Tzung-Bi Shih <tzungbi@...gle.com>
Link: https://lore.kernel.org/r/20201203155914.3844426-1-tzungbi@google.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@...aro.org>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
drivers/remoteproc/mtk_scp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c
index f74f22d4d1ffc..52fa01d67c18e 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;
--
2.27.0
Powered by blists - more mailing lists