* [PATCH] remoteproc/mediatek: unprepare clk if scp_before_load fails
@ 2020-12-02 4:45 ` Tzung-Bi Shih
0 siblings, 0 replies; 6+ messages in thread
From: Tzung-Bi Shih @ 2020-12-02 4:45 UTC (permalink / raw)
To: ohad, bjorn.andersson
Cc: linux-remoteproc, matthias.bgg, linux-mediatek, linux-arm-kernel,
mathieu.poirier, pihsun, tzungbi
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(-)
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;
}
--
2.29.2.454.gaff20da3a2-goog
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] remoteproc/mediatek: unprepare clk if scp_before_load fails
@ 2020-12-02 4:45 ` Tzung-Bi Shih
0 siblings, 0 replies; 6+ messages in thread
From: Tzung-Bi Shih @ 2020-12-02 4:45 UTC (permalink / raw)
To: ohad, bjorn.andersson
Cc: mathieu.poirier, linux-remoteproc, tzungbi, linux-mediatek,
pihsun, matthias.bgg, linux-arm-kernel
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(-)
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;
}
--
2.29.2.454.gaff20da3a2-goog
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] remoteproc/mediatek: unprepare clk if scp_before_load fails
@ 2020-12-02 4:45 ` Tzung-Bi Shih
0 siblings, 0 replies; 6+ messages in thread
From: Tzung-Bi Shih @ 2020-12-02 4:45 UTC (permalink / raw)
To: ohad, bjorn.andersson
Cc: mathieu.poirier, linux-remoteproc, tzungbi, linux-mediatek,
pihsun, matthias.bgg, linux-arm-kernel
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(-)
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;
}
--
2.29.2.454.gaff20da3a2-goog
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] remoteproc/mediatek: unprepare clk if scp_before_load fails
2020-12-02 4:45 ` Tzung-Bi Shih
(?)
@ 2020-12-02 20:35 ` Mathieu Poirier
-1 siblings, 0 replies; 6+ messages in thread
From: Mathieu Poirier @ 2020-12-02 20:35 UTC (permalink / raw)
To: Tzung-Bi Shih
Cc: ohad, bjorn.andersson, linux-remoteproc, matthias.bgg,
linux-mediatek, linux-arm-kernel, pihsun
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
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] remoteproc/mediatek: unprepare clk if scp_before_load fails
@ 2020-12-02 20:35 ` Mathieu Poirier
0 siblings, 0 replies; 6+ messages in thread
From: Mathieu Poirier @ 2020-12-02 20:35 UTC (permalink / raw)
To: Tzung-Bi Shih
Cc: ohad, linux-remoteproc, bjorn.andersson, linux-mediatek, pihsun,
matthias.bgg, linux-arm-kernel
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
>
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] remoteproc/mediatek: unprepare clk if scp_before_load fails
@ 2020-12-02 20:35 ` Mathieu Poirier
0 siblings, 0 replies; 6+ messages in thread
From: Mathieu Poirier @ 2020-12-02 20:35 UTC (permalink / raw)
To: Tzung-Bi Shih
Cc: ohad, linux-remoteproc, bjorn.andersson, linux-mediatek, pihsun,
matthias.bgg, linux-arm-kernel
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
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-12-02 20:36 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-02 4:45 [PATCH] remoteproc/mediatek: unprepare clk if scp_before_load fails Tzung-Bi Shih
2020-12-02 4:45 ` Tzung-Bi Shih
2020-12-02 4:45 ` Tzung-Bi Shih
2020-12-02 20:35 ` Mathieu Poirier
2020-12-02 20:35 ` Mathieu Poirier
2020-12-02 20:35 ` Mathieu Poirier
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.