The proxy power domain enable path discards the return value of dev_pm_genpd_set_performance_state(), masking failures silently. When the call fails the performance state is not applied, yet firmware load proceeds without any indication of the problem.
Capture the return value and bail out on failure, unwinding any previously voted proxy PDs via the existing unroll path. A proxy performance state failure indicates that the requested OPP is not supported by the underlying power domain; continuing would leave the remoteproc running with an unconfigured voltage/frequency vote, so treat it as fatal. Reviewed-by: Abel Vesa <[email protected]> Signed-off-by: Mukesh Ojha <[email protected]> --- drivers/remoteproc/qcom_q6v5_pas.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c index a005546c265d..c163e66347f8 100644 --- a/drivers/remoteproc/qcom_q6v5_pas.c +++ b/drivers/remoteproc/qcom_q6v5_pas.c @@ -167,7 +167,13 @@ static int qcom_pas_pds_enable(struct qcom_pas *pas, struct device **pds, int i; for (i = 0; i < pd_count; i++) { - dev_pm_genpd_set_performance_state(pds[i], INT_MAX); + ret = dev_pm_genpd_set_performance_state(pds[i], INT_MAX); + if (ret) { + dev_err(pas->dev, + "failed to set proxy PD %d state %u: %d\n", + i, INT_MAX, ret); + goto unroll_pd_votes; + } ret = pm_runtime_get_sync(pds[i]); if (ret < 0) { pm_runtime_put_noidle(pds[i]); -- 2.55.0

