Skip to contentSkip to conversation

remoteproc: qcom: hexagon: Fix error return code in q6v5_probe()

PATCH Applied Wei Yongjun 2 participants 2 messages Jul 29, 2016 – Aug 10, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 remoteproc: qcom: hexagon: Fix error return code in q6v5_probe()

Fix to return a negative error code from the state get failed error handling case instead of 0, as done elsewhere in this function.

---
 drivers/remoteproc/qcom_q6v5_pil.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/remoteproc/qcom_q6v5_pil.c +3 -1
index 2479188..0ad536d 100644
@@ -864,8 +864,10 @@ static int q6v5_probe(struct platform_device *pdev)
 		goto free_rproc;
 
 	qproc->state = qcom_smem_state_get(&pdev->dev, "stop", &qproc->stop_bit);
-	if (IS_ERR(qproc->state))
+	if (IS_ERR(qproc->state)) {
+		ret = PTR_ERR(qproc->state);
 		goto free_rproc;
+	}
 
 	ret = rproc_add(rproc);
 	if (ret)
#1 lore raw
Quoted 5 lines · Wei Yongjun

Fix to return a negative error code from the state get failed error handling case instead of 0, as done elsewhere in this function.

---

Applied, thanks.

Regards,
Bjorn

Quoted 20 lines
 drivers/remoteproc/qcom_q6v5_pil.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/remoteproc/qcom_q6v5_pil.c +3 -1
index 2479188..0ad536d 100644
@@ -864,8 +864,10 @@ static int q6v5_probe(struct platform_device *pdev)
 		goto free_rproc;
 
 	qproc->state = qcom_smem_state_get(&pdev->dev, "stop", &qproc->stop_bit);
-	if (IS_ERR(qproc->state))
+	if (IS_ERR(qproc->state)) {
+		ret = PTR_ERR(qproc->state);
 		goto free_rproc;
+	}
 
 	ret = rproc_add(rproc);
 	if (ret)