]> Git Repo - linux.git/commitdiff
remoteproc/mediatek: unprepare clk if scp_before_load fails
authorTzung-Bi Shih <[email protected]>
Thu, 3 Dec 2020 15:59:14 +0000 (23:59 +0800)
committerBjorn Andersson <[email protected]>
Thu, 10 Dec 2020 19:31:47 +0000 (13:31 -0600)
Fixes the error handling to unprepare clk if scp_before_load fails.

Reviewed-by: Mathieu Poirier <[email protected]>
Fixes: fd0b6c1ff85a ("remoteproc/mediatek: Add support for mt8192 SCP")
Signed-off-by: Tzung-Bi Shih <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Bjorn Andersson <[email protected]>
drivers/remoteproc/mtk_scp.c

index 5f42b9ce718524b21178e25a44319f75b933a8a4..5e5705fe35a8f06f6898c5df5152973c075cd566 100644 (file)
@@ -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;
This page took 0.056192 seconds and 4 git commands to generate.