Message ID | 20201202044537.2500497-1-tzungbi@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | remoteproc/mediatek: unprepare clk if scp_before_load fails | expand |
On Wed, Dec 02, 2020 at 12:45:37PM +0800, Tzung-Bi Shih wrote: > Fixes the error handling to unprepare clk if scp_before_load fails. > This requires a "Fixes:" tag. > Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> > --- > drivers/remoteproc/mtk_scp.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c > index 5f42b9ce7185..c7d49c861adb 100644 > --- a/drivers/remoteproc/mtk_scp.c > +++ b/drivers/remoteproc/mtk_scp.c > @@ -350,11 +350,11 @@ 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); > - Unneeded change Thanks, Mathieu > return ret; > } > > -- > 2.29.2.454.gaff20da3a2-goog >
diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c index 5f42b9ce7185..c7d49c861adb 100644 --- a/drivers/remoteproc/mtk_scp.c +++ b/drivers/remoteproc/mtk_scp.c @@ -350,11 +350,11 @@ 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; }
Fixes the error handling to unprepare clk if scp_before_load fails. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> --- drivers/remoteproc/mtk_scp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)