Fix to return the error code -EREMOTEIO from pdr_register_listener
rather than 0.

Fixes: fbe639b44a82 ("soc: qcom: Introduce Protection Domain Restart helpers")
Reported-by: Hulk Robot <hul...@huawei.com>
Signed-off-by: Qinglang Miao <miaoqingl...@huawei.com>
---
 drivers/soc/qcom/pdr_interface.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/soc/qcom/pdr_interface.c b/drivers/soc/qcom/pdr_interface.c
index 088dc99f7..3da12ec2a 100644
--- a/drivers/soc/qcom/pdr_interface.c
+++ b/drivers/soc/qcom/pdr_interface.c
@@ -153,6 +153,7 @@ static int pdr_register_listener(struct pdr_handle *pdr,
        if (resp.resp.result != QMI_RESULT_SUCCESS_V01) {
                pr_err("PDR: %s register listener failed: 0x%x\n",
                       pds->service_path, resp.resp.error);
+               ret = -EREMOTEIO;
                return ret;
        }
 
-- 
2.23.0

Reply via email to