From patchwork Tue Oct 4 16:23:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 9362331 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 EE292607D6 for ; Tue, 4 Oct 2016 21:56:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE9822873D for ; Tue, 4 Oct 2016 21:56:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D2B7C28BC6; Tue, 4 Oct 2016 21:56:55 +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 EB9542873D for ; Tue, 4 Oct 2016 21:56:53 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 1FAAA267036; Tue, 4 Oct 2016 23:56:51 +0200 (CEST) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id DF602267025; Tue, 4 Oct 2016 23:54:29 +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 1CC89266EE6; Tue, 4 Oct 2016 18:23:41 +0200 (CEST) Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by alsa0.perex.cz (Postfix) with ESMTP id E00B6266E84 for ; Tue, 4 Oct 2016 18:23:36 +0200 (CEST) X-IronPort-AV: E=Sophos;i="5.31,444,1473112800"; d="scan'208";a="239390322" Received: from p57801a74.dip0.t-ipconnect.de (HELO hadrien.local) ([87.128.26.116]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 04 Oct 2016 18:23:35 +0200 Date: Tue, 4 Oct 2016 18:23:24 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: =?ISO-8859-15?Q?Myl=E8ne_Josserand?= Message-ID: User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, Wei Yongjun , Liam Girdwood , Takashi Iwai , Chen-Yu Tsai , Mark Brown , kbuild-all@01.org, Maxime Ripard Subject: [alsa-devel] [PATCH] ASoC: sun4i-i2s: fix odd_ptr_err.cocci warnings 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 sound/soc/sunxi/sun4i-i2s.c:633:5-11: inconsistent IS_ERR and PTR_ERR on line 635. PTR_ERR should normally access the value just tested by IS_ERR Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci Signed-off-by: Julia Lawall Signed-off-by: Fengguang Wu --- Please take the patch only if it's a positive warning. Thanks! sun4i-i2s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -632,7 +632,7 @@ static int sun4i_i2s_probe(struct platfo reset_apb = devm_reset_control_get(&pdev->dev, "apb_reset"); if (IS_ERR(reset_apb)) { dev_err(&pdev->dev, "Can't get apb reset\n"); - return PTR_ERR(i2s->mod_clk); + return PTR_ERR(reset_apb); } ret = reset_control_deassert(reset_apb);