From patchwork Thu Mar 25 03:08:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 12162799 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5D533C433C1 for ; Thu, 25 Mar 2021 02:59:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2199C61A19 for ; Thu, 25 Mar 2021 02:59:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230063AbhCYC7Q (ORCPT ); Wed, 24 Mar 2021 22:59:16 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:14465 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229508AbhCYC7M (ORCPT ); Wed, 24 Mar 2021 22:59:12 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4F5VBZ57zLzwQll; Thu, 25 Mar 2021 10:57:10 +0800 (CST) Received: from localhost.localdomain (10.175.102.38) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.498.0; Thu, 25 Mar 2021 10:59:04 +0800 From: 'Wei Yongjun To: , Andy Gross , Bjorn Andersson , Ohad Ben-Cohen , "Mathieu Poirier" , Philipp Zabel , Govind Singh CC: , , , Hulk Robot Subject: [PATCH -next] remoteproc: qcom: wcss: Fix wrong pointer passed to PTR_ERR() Date: Thu, 25 Mar 2021 03:08:57 +0000 Message-ID: <20210325030857.3978824-1-weiyongjun1@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.175.102.38] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Wei Yongjun 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 Signed-off-by: Wei Yongjun --- 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..eda64f86d7b0 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 PTR_ERR(wcss->qdsp6ss_axim_cbcr); } wcss->lcc_bcr_sleep = devm_clk_get(wcss->dev, "lcc_bcr_sleep");