Skip to contentSkip to conversation

remoteproc: qcom: wcss: Fix wrong pointer passed to PTR_ERR()

PATCH Applied Wei Yongjun 4 participants 4 messages Mar 26, 2021 – May 26, 2021

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

PATCH v2 1/1 remoteproc: qcom: wcss: Fix wrong pointer passed to PTR_ERR()

PTR_ERR should access the value just tested by IS_ERR, otherwise the wrong error code will be returned.

This commit fix it by return 'ret' directly.

Fixes 0af65b9b915e ("remoteproc: qcom: wcss: Add non pas wcss Q6 support for QCS404")

---
v1 -> v2: just return ret as Dan's suggestion.

---
 drivers/remoteproc/qcom_q6v5_wcss.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/remoteproc/qcom_q6v5_wcss.c +1 -1
index 71ec1a451e35..7dea0585bbb6 100644
@@ -972,7 +972,7 @@ static int q6v5_wcss_init_clock(struct q6v5_wcss *wcss)
 		ret = PTR_ERR(wcss->qdsp6ss_axim_cbcr);
 		if (ret != -EPROBE_DEFER)
 			dev_err(wcss->dev, "failed to get axim cbcr clk\n");
-		return PTR_ERR(wcss->qdsp6ss_abhm_cbcr);
+		return ret;
 	}
 
 	wcss->lcc_bcr_sleep = devm_clk_get(wcss->dev, "lcc_bcr_sleep");
Reviewed-by on v2 1/1
#1 lore raw
Quoted 10 lines · Wei Yongjun

PTR_ERR should access the value just tested by IS_ERR, otherwise the wrong error code will be returned.

This commit fix it by return 'ret' directly.

Fixes 0af65b9b915e ("remoteproc: qcom: wcss: Add non pas wcss Q6 support for QCS404")

---
v1 -> v2: just return ret as Dan's suggestion.

Thanks!

regards,
dan carpenter

#2 lore raw
In reply to Wei Yongjun
This patch was applied to andersson/remoteproc.git (refs/heads/for-next):

Hello:

This patch was applied to andersson/remoteproc.git (refs/heads/for-next):

Quoted 10 lines · On Fri, 26 Mar 2021 02:47:41 +0000 you wrote:

PTR_ERR should access the value just tested by IS_ERR, otherwise the wrong error code will be returned.

This commit fix it by return 'ret' directly.

Fixes 0af65b9b915e ("remoteproc: qcom: wcss: Add non pas wcss Q6 support for QCS404")

[...]

Here is the summary with links:
- [-next,v2] remoteproc: qcom: wcss: Fix wrong pointer passed to PTR_ERR()

    https://git.kernel.org/andersson/remoteproc/c/ca0e89406ba1

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html

#3 lore raw
In reply to Wei Yongjun
This patch was applied to qcom/linux.git (refs/heads/for-next):

Hello:

This patch was applied to qcom/linux.git (refs/heads/for-next):

Quoted 10 lines · On Fri, 26 Mar 2021 02:47:41 +0000 you wrote:

PTR_ERR should access the value just tested by IS_ERR, otherwise the wrong error code will be returned.

This commit fix it by return 'ret' directly.

Fixes 0af65b9b915e ("remoteproc: qcom: wcss: Add non pas wcss Q6 support for QCS404")

[...]

Here is the summary with links:
- [-next,v2] remoteproc: qcom: wcss: Fix wrong pointer passed to PTR_ERR()

    https://git.kernel.org/qcom/c/ca0e89406ba1

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html