soc: qcom: pdr: Fix error return code in pdr_register_listener
authorQinglang Miao <miaoqinglang@huawei.com>
Wed, 25 Nov 2020 06:50:34 +0000 (14:50 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 May 2021 07:50:15 +0000 (09:50 +0200)
[ Upstream commit 769738fc49bb578e05d404b481a9241d18147d86 ]

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 <hulkci@huawei.com>
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
Link: https://lore.kernel.org/r/20201125065034.154217-1-miaoqinglang@huawei.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/soc/qcom/pdr_interface.c

index f63135c09667f9a799c5ea91e5988ab7958de34e..205cc96823b70285308916343bd4067a4a2971b5 100644 (file)
@@ -153,7 +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);
-               return ret;
+               return -EREMOTEIO;
        }
 
        pds->state = resp.curr_state;