remoteproc: qcom: wcss: Fix wrong pointer passed to PTR_ERR()
PATCH 1/1 remoteproc: qcom: wcss: Fix wrong pointer passed to PTR_ERR()
From: Wei Yongjun <[email protected]>
PTR_ERR should access the value just tested by IS_ERR, otherwise the wrong error code will be returned.
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]>
--- 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 PTR_ERR (wcss->qdsp6ss_axim_cbcr); } wcss->lcc_bcr_sleep =devm_clk_get (wcss->dev,"lcc_bcr_sleep" );
Quoted 17 lines · Wei Yongjun
From: Wei Yongjun <[email protected]>
PTR_ERRshould access the value just tested byIS_ERR, otherwise the wrong error code will be returned.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]>--- drivers/remoteproc/qcom_q6v5_wcss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/remoteproc/qcom_q6v5_wcss.c +0
-0
drivers/remoteproc/qcom_q6v5_wcss.c static int q6v5_wcss_init_clock(struct q6v5_wcss *wcss) · line 975
Quoted 5 lines
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 PTR_ERR (wcss->qdsp6ss_axim_cbcr);
Just return ret;
(Don't worry about being consistent when the other returns are doing it wrong).
regards,
dan carpenter