From patchwork Sun Aug 30 18:05:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 7097901 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9E0B5BEEC1 for ; Sun, 30 Aug 2015 18:16:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CD9E7207F9 for ; Sun, 30 Aug 2015 18:16:08 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id D0AD3207A1 for ; Sun, 30 Aug 2015 18:16:07 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 772E12614C4; Sun, 30 Aug 2015 20:15:59 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id C1A64260609; Sun, 30 Aug 2015 20:15:30 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id E2814260609; Sun, 30 Aug 2015 20:15:28 +0200 (CEST) Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by alsa0.perex.cz (Postfix) with ESMTP id AA69B260609 for ; Sun, 30 Aug 2015 20:15:18 +0200 (CEST) X-IronPort-AV: E=Sophos;i="5.17,435,1437429600"; d="scan'208";a="144201196" Received: from palace.rsr.lip6.fr (HELO localhost.localdomain) ([132.227.105.202]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 30 Aug 2015 20:15:14 +0200 From: Julia Lawall To: Patrick Lai Date: Sun, 30 Aug 2015 20:05:10 +0200 Message-Id: <1440957911-7687-2-git-send-email-Julia.Lawall@lip6.fr> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1440957911-7687-1-git-send-email-Julia.Lawall@lip6.fr> References: <1440957911-7687-1-git-send-email-Julia.Lawall@lip6.fr> Cc: alsa-devel@alsa-project.org, Banajit Goswami , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Takashi Iwai , Liam Girdwood , Mark Brown Subject: [alsa-devel] [PATCH 1/2] ASoC: qcom: change PTR_ERR argument X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Apply PTR_ERR to the value that was recently assigned. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression x,y; @@ if (IS_ERR(x) || ...) { ... when any when != IS_ERR(...) ( PTR_ERR(x) | * PTR_ERR(y) ) ... when any } // Signed-off-by: Julia Lawall Acked-by: Kenneth Westfield --- sound/soc/qcom/lpass-cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc/qcom/lpass-cpu.c b/sound/soc/qcom/lpass-cpu.c index 23f3d59..94beb99 100644 --- a/sound/soc/qcom/lpass-cpu.c +++ b/sound/soc/qcom/lpass-cpu.c @@ -438,7 +438,8 @@ int asoc_qcom_lpass_cpu_platform_probe(struct platform_device *pdev) if (IS_ERR(drvdata->mi2s_bit_clk[dai_id])) { dev_err(&pdev->dev, "%s() error getting mi2s-bit-clk: %ld\n", - __func__, PTR_ERR(drvdata->mi2s_bit_clk[i])); + __func__, + PTR_ERR(drvdata->mi2s_bit_clk[dai_id])); return PTR_ERR(drvdata->mi2s_bit_clk[dai_id]); } }