From patchwork Fri Apr 21 22:14:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 9693857 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DC2C060328 for ; Fri, 21 Apr 2017 22:15:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C29C628627 for ; Fri, 21 Apr 2017 22:15:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B5CA82867C; Fri, 21 Apr 2017 22:15:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D010D28627 for ; Fri, 21 Apr 2017 22:15:09 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id A37F2267353; Sat, 22 Apr 2017 00:15:07 +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 D0D87267354; Sat, 22 Apr 2017 00:15:05 +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 42D4626727F for ; Sat, 22 Apr 2017 00:15:02 +0200 (CEST) X-IronPort-AV: E=Sophos;i="5.37,231,1488841200"; d="scan'208";a="221138021" Received: from vaio-julia.rsr.lip6.fr ([132.227.76.33]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Apr 2017 00:15:01 +0200 Date: Sat, 22 Apr 2017 00:14:57 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Simon Ho Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, Takashi Iwai , linux-kernel@vger.kernel.org, Liam Girdwood , Mark Brown , kbuild-all@01.org Subject: [alsa-devel] [PATCH] ASoC: fix odd_ptr_err.cocci warnings (fwd) 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP I don't think the patch is correct, so I haven't bothered signing off on it. Probably the & is not correct in the IS_ERR call? julia ---------- Forwarded message ---------- Date: Sat, 22 Apr 2017 06:09:26 +0800 From: kbuild test robot To: kbuild@01.org Cc: Julia Lawall Subject: [PATCH] ASoC: fix odd_ptr_err.cocci warnings PTR_ERR should access the value just tested by IS_ERR Semantic patch information: There can be false positives in the patch case, where it is the call to IS_ERR that is wrong. Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci CC: Simon Ho Signed-off-by: Fengguang Wu --- Please take the patch only if it's a positive warning. Thanks! cx2072x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/sound/soc/codecs/cx2072x.c +++ b/sound/soc/codecs/cx2072x.c @@ -2183,7 +2183,7 @@ static int cx2072x_i2c_probe(struct i2c_ &cx2072x_regmap); if (IS_ERR(&cx2072x->regmap)) { - ret = PTR_ERR(cx2072x->regmap); + ret = PTR_ERR(&cx2072x->regmap); dev_err(&i2c->dev, "Failed to init regmap: %d\n", ret); return ret; }