]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
remoteproc: Prevent incorrect rproc state on xfer mem ownership failure
authorSibi Sankar <sibis@codeaurora.org>
Tue, 17 Apr 2018 19:44:15 +0000 (01:14 +0530)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Tue, 17 Apr 2018 21:41:00 +0000 (14:41 -0700)
Any failure in the secure call for transferring mem ownership of mba
region to Q6 would result in reporting that the remoteproc device
is running. This is because the previous q6v5_clk_enable would have
been a success. Prevent this by updating variable 'ret' accordingly.

Cc: stable@vger.kernel.org
Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/remoteproc/qcom_q6v5_pil.c

index 8e70a627e0bbc70ba1040a51c5cc71a93b0ddaab..8d4a2eb3736ed6362156dfadb7c03aed408fcd2b 100644 (file)
@@ -761,13 +761,11 @@ static int q6v5_start(struct rproc *rproc)
        }
 
        /* Assign MBA image access in DDR to q6 */
-       xfermemop_ret = q6v5_xfer_mem_ownership(qproc, &qproc->mba_perm, true,
-                                               qproc->mba_phys,
-                                               qproc->mba_size);
-       if (xfermemop_ret) {
+       ret = q6v5_xfer_mem_ownership(qproc, &qproc->mba_perm, true,
+                                     qproc->mba_phys, qproc->mba_size);
+       if (ret) {
                dev_err(qproc->dev,
-                       "assigning Q6 access to mba memory failed: %d\n",
-                       xfermemop_ret);
+                       "assigning Q6 access to mba memory failed: %d\n", ret);
                goto disable_active_clks;
        }