[PATCH] remoteproc/mediatek: unprepare clk if scp_before_load fails

Mathieu Poirier mathieu.poirier at linaro.org
Wed Dec 2 15:35:07 EST 2020


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 at 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
> 



More information about the linux-arm-kernel mailing list