linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next v2] remoteproc: qcom: wcss: Fix wrong pointer passed to PTR_ERR()
@ 2021-03-26  2:47 Wei Yongjun
  2021-03-26  8:12 ` Dan Carpenter
  2021-05-26 19:03 ` patchwork-bot+linux-arm-msm
  0 siblings, 2 replies; 3+ messages in thread
From: Wei Yongjun @ 2021-03-26  2:47 UTC (permalink / raw)
  To: weiyongjun1, Govind Singh, Andy Gross, Bjorn Andersson,
	Ohad Ben-Cohen, Mathieu Poirier, Philipp Zabel, Dan Carpenter
  Cc: linux-arm-msm, linux-remoteproc, kernel-janitors, Hulk Robot

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")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
v1 -> v2: just return ret as Dan's suggestion.
---
 drivers/remoteproc/qcom_q6v5_wcss.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/remoteproc/qcom_q6v5_wcss.c b/drivers/remoteproc/qcom_q6v5_wcss.c
index 71ec1a451e35..7dea0585bbb6 100644
--- a/drivers/remoteproc/qcom_q6v5_wcss.c
+++ b/drivers/remoteproc/qcom_q6v5_wcss.c
@@ -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");


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH -next v2] remoteproc: qcom: wcss: Fix wrong pointer passed to PTR_ERR()
  2021-03-26  2:47 [PATCH -next v2] remoteproc: qcom: wcss: Fix wrong pointer passed to PTR_ERR() Wei Yongjun
@ 2021-03-26  8:12 ` Dan Carpenter
  2021-05-26 19:03 ` patchwork-bot+linux-arm-msm
  1 sibling, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2021-03-26  8:12 UTC (permalink / raw)
  To: Wei Yongjun
  Cc: Govind Singh, Andy Gross, Bjorn Andersson, Ohad Ben-Cohen,
	Mathieu Poirier, Philipp Zabel, linux-arm-msm, linux-remoteproc,
	kernel-janitors, Hulk Robot

On Fri, Mar 26, 2021 at 02:47:41AM +0000, Wei Yongjun 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")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
> v1 -> v2: just return ret as Dan's suggestion.

Thanks!

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -next v2] remoteproc: qcom: wcss: Fix wrong pointer passed to PTR_ERR()
  2021-03-26  2:47 [PATCH -next v2] remoteproc: qcom: wcss: Fix wrong pointer passed to PTR_ERR() Wei Yongjun
  2021-03-26  8:12 ` Dan Carpenter
@ 2021-05-26 19:03 ` patchwork-bot+linux-arm-msm
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+linux-arm-msm @ 2021-05-26 19:03 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: linux-arm-msm

Hello:

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

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")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> 
> [...]

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-05-26 19:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-26  2:47 [PATCH -next v2] remoteproc: qcom: wcss: Fix wrong pointer passed to PTR_ERR() Wei Yongjun
2021-03-26  8:12 ` Dan Carpenter
2021-05-26 19:03 ` patchwork-bot+linux-arm-msm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).