remoteproc: qcom: wcss: Fix wrong pointer passed to PTR_ERR()
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.
---
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
@@ -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" );
Quoted 10 lines · Wei Yongjun
PTR_ERRshould access the value just tested byIS_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")Reported-by Hulk Robot <[email protected]>Signed-off-by Wei Yongjun <[email protected]>---
v1 -> v2: just return ret as Dan's suggestion.
Thanks!
regards,
dan carpenter
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_ERRshould access the value just tested byIS_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")Reported-by Hulk Robot <[email protected]>Signed-off-by Wei Yongjun <[email protected]>[...]
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
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_ERRshould access the value just tested byIS_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")Reported-by Hulk Robot <[email protected]>Signed-off-by Wei Yongjun <[email protected]>[...]
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