Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
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>
Link: https://lore.kernel.org/r/20210326024741.841267-1-weiyongjun1@huawei.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>

authored by

Wei Yongjun and committed by
Bjorn Andersson
ca0e8940 3fdba9d2

+1 -1
+1 -1
drivers/remoteproc/qcom_q6v5_wcss.c
··· 972 972 ret = PTR_ERR(wcss->qdsp6ss_axim_cbcr); 973 973 if (ret != -EPROBE_DEFER) 974 974 dev_err(wcss->dev, "failed to get axim cbcr clk\n"); 975 - return PTR_ERR(wcss->qdsp6ss_abhm_cbcr); 975 + return ret; 976 976 } 977 977 978 978 wcss->lcc_bcr_sleep = devm_clk_get(wcss->dev, "lcc_bcr_sleep");